#include using namespace std; using ll = long long; #ifdef LOCAL #include "debug.hh" #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 (k < n / 2 + 2) { cout << "No\n"; return 0; } cout << "Yes\n"; int v = (n + 1) / 2; for (int i = 0; i < v; i++) { cout << "1 2\n"; } for (int i = 0; i < n - v; i++) { cout << "3 4\n"; } return 0; }