#include<iostream> using namespace std; int main() { int n,i,j; cin>>n>>i>>j; for(int a=0;a<n;a++){ cout<<"("<<i<<","<<a+1<<") "; } cout<<endl; for(int a=0;a<n;a++){ cout<<"("<<a+1<<","<<j<<") "; } cout<<endl; for(int a1=1;a1<=n;a1++){ if(a1+j-i<=n&&a1+j-i>=1){ int b=a1+j-i; cout<<"("<<a1<<","<<b<<") "; } } cout<<endl; for(int a=n;a>=1;a--){ int a1=0-a+i+j; if(a1<=n&&a1>=1){ int b=a1; cout<<"("<<a<<","<<b<<") "; } } cout<<endl; return 0; }