#include using namespace std; using ll = long long; void solve(){ int Q, K; cin >> Q >> K; vector> op; if(Q == 1){ if(K < 3){ cout << "No/n"; }else{ cout << "Yes\n"; cout << 1 << " " << 2 << "\n"; } return; } int cnt = 1; for(int i = 0; i < Q; ++i){ if(i < 2) ++cnt; else if(i & 1) ++cnt; if(i < 2){ op.emplace_back(1, 2); }else if(i & 1){ op.emplace_back(1, 2); }else{ op.emplace_back(3, 4); } } if(cnt <= K){ cout << "Yes\n"; for(auto [x, y]: op) cout << x << " " << y << "\n"; }else{ cout << "No\n"; } } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout << setprecision(10) << fixed; int T; T = 1; //cin >> T; for(;T--;) solve(); }