#include #include using namespace std; using ll = long long; int Q, K; int main(void){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> Q >> K; // [0, 1, 1], [0, 1] if(K < (Q + 1) / 2 + 1){ cout << "No\n"; return 0; } cout << "Yes\n"; vector> ans; ans.push_back({0, 1}); for(int i = 0;i < Q - 1;i++){ ans.push_back({i % 2, i % 2 + 2}); } for(auto [a, b] : ans){ cout << a + 1 << " " << b + 1 << "\n"; } return 0; }