#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,K; cin >> N >> K; K -= 2; if(N/2 > K) cout << "No\n"; else{ cout << "Yes\n"; while(N){ cout << "1 2\n"; N--; if(N == 0) break; cout << "1 2\n"; N--; if(N == 0) break; cout << "3 4\n"; N--; if(N == 0) break; cout << "3 4\n"; N--; } } }