#include using namespace std; void check(vector> ope){ auto f = [&](int a0,int a1) -> int { vector A = {a0,a1}; for(auto [p,q] : ope){ if(A.at(p) == 1 && A.at(q) == 1) A.push_back(0); else A.push_back(1); } return accumulate(A.begin(),A.end(),0); }; cout << "00->" << f(0,0) << endl; cout << "01->" << f(0,1) << endl; cout << "10->" << f(1,0) << endl; cout << "11->" << f(1,1) << endl; } int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,K; cin >> N >> K; K -= 2; if(N/2 > K && true) cout << "No\n"; else{ cout << "Yes\n"; vector> ope; { cout << "1 2\n"; N--; ope.push_back({0,1}); if(N){ cout << "1 2\n"; N--; ope.push_back({0,1}); } } while(N){ cout << "3 4\n"; N--; ope.push_back({2,3}); if(N == 0) break; cout << "1 2\n"; N--; ope.push_back({0,1}); } //check(ope); } }