#include #include #include using namespace std; // #include // using namespace atcoder; // using mint = modint998244353; using ll = long long; #define fix(x) fixed << setprecision(x) #define rep(i, n) for(int i = 0; i < n; ++i) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a> x >> y; cout << x*y << " " << x*y << '\n'; rep(i,x) cout << i+1 << " " << (i+1)%x+1 << '\n'; rep(i,x){ rep(j,y-1) cout << i+1+j*x << " " << i+1+(j+1)*x << '\n'; } return 0; }