#include #include #include using namespace std; using namespace atcoder; using ll = long long; //#define endl "\n"; vector> ans = {{1, 2},{2,3},{1,4}}; int main(){ int Q, K; cin >> Q >> K; if(Q == 1){ if(K >= 2){ cout << "Yes" << endl; cout << ans[0].first << " " << ans[0].second << endl; return 0; }else{ cout << "No" << endl; return 0; } } if(Q == 2 || Q == 3){ if(K >= 3){ cout << "Yes" << endl; for(int i = 0; i < Q; i++) cout << ans[i].first << " " << ans[i].second << endl; return 0; }else{ cout << "No" << endl; return 0; } } if(Q >= 4){ int rest = Q - 3; if(K >= 3 + (rest + 1) / 2){ cout << "Yes" << endl; for(int i = 0; i < 3; i++) cout << ans[i].first << " " << ans[i].second << endl; for(int i = 0; i < rest; i++){ if(i % 2 == 0) cout << 3 << " " << 5 << endl; else cout << 1 << " " << 4 << endl; } return 0; }else{ cout << "No" << endl; return 0; } } return 0; }