#include using namespace std; using ll = long long; #ifdef LOCAL #include #else #define dbg(...) 0 #define dbgn(...) 0 #endif int32_t main() { cin.tie(0)->sync_with_stdio(0); int n, k; cin >> n >> k; if((n - 1) / 2 + 1 <= k){ cout << "Yes\n"; for(int i = 0; i < (n + 1) / 2; i++){ cout << "1 2\n"; } for(int j = (n + 1) / 2; j < n; j++){ cout << "3 4\n"; } } else cout << "No\n"; return 0; }