#include <iostream>
using namespace std;
int cnt = 0;
const int delta[4][2] = {{1, -2}, {2, -1}, {2, 1}, {1, 2}};
struct
point
{
int
x, y;
point()
{
x = y = 0;
}
}p[1001], target;
ostream& operator << (ostream& out, point ppp)
{
out << "(" << ppp.x << "," << ppp.y << ")";
return out;
}
void
__read__()
{
cin >> target.x >> target.y;
}
void
__outp__()
{
point pppp;
cout << pppp;
for(int i = 1; i <= cnt; i++)
cout << p[i];
cout << endl;
}
void
__dfs__(point pp)
{
if(pp.x == target.x
&& pp.y == target.y)
{
__outp__();
return;
}
for(int i = 0; i <= 3; i++)
{
point pt = pp;
pt.x += delta[i][0];
pt.y += delta[i][1];
if(pt.x <= target.x && pt.x >= 0
&& pt.y <= target.y && pt.y >= 0)
{
p[++cnt] = pt;
__dfs__(pt);
cnt--;
}
}
}
int
main()
{
point source;
__read__();
__dfs__(source);
return 0;
}