#include<bits/stdc++.h>
using namespace std;
int main()
{
int N, i, j, a,b;
cin >> N >> i >> j;
for (a = 1; a <= N; a++)
cout << '(' << i << ',' << a << ')'<<" ";
cout << endl;
for (a = 1; a <= N; a++)
cout << '(' << a << ',' << j << ')'<<" ";
cout << endl;
for (a = 1; a <= N; a++)
for (b = 1; b <= N; b++)
if (i-j==a-b )//左上到右下,横纵坐标相减有不同的差值
cout << '(' << a << ',' << b << ')'<<" ";
cout << endl;
for (a = N; a >= 1; a--)
for (b = N; b >= 1; b--)
if (i + j==a+b)//左下到右上,横纵坐标相加有不同的和
cout << '(' << a<< ',' << b << ')'<<" ";
cout << endl;
return 0;
}