t = int(input())
for i in range(0,t):
A = int(input())
if A>=0:
for i in range(0,A):
for j in range(i+1,A):
if (ii)+(jj)==A:
print("({},{})".format(i,j),end=" ")
else:
continue
t = int(input())
for i in range(0,t):
A = int(input())
if A>=0:
for i in range(0,A):
for j in range(i+1,A):
if (ii)+(jj)==A:
print("({},{})".format(i,j),end=" ")
else:
continue