#ifndef VS #include #endif using namespace std; typedef long long LL; #ifdef BTK #define DEBUG if(1) #else #define CIN_ONLY if(0) struct cww {cww() {CIN_ONLY{ios::sync_with_stdio(false); cin.tie(0);}} }star; #define DEBUG if(0) #endif #define ALL(v) (v).begin(),(v).end() #define REC(ret, ...) std::function template inline bool chmin(T &l, T r){bool a = l>r; if (a)l = r; return a;} template inline bool chmax(T &l, T r){bool a = listream& operator>>(istream &is, vector &v){for (auto &it : v)is >> it;return is;} class range {private: struct I { int x; int operator*() { return x; }bool operator!=(I& lhs) { return x> N >> M; int s = N / 2; int t = N - s; vector a; vector b; if (M < N - 1 || s*(LL)t < M) { cout << "NO" << endl; return 0; } else cout << "YES" << endl; for (auto i : range(0, s))a.push_back(i + 1); for (auto i : range(s, N))b.push_back(i + 1); for (auto i : range(N))cout << " " + (!i) << i + 1; cout << endl; for (auto i : range(s)) { cout << a[i] << " " << b[i] << endl; M--; } for (auto i : range(s)) if(i+1