http://noi.openjudge.cn/ch0108/04/
"""
1.8 编程基础之多维数组 04 错误探测
http://noi.openjudge.cn/ch0108/04/
"""
a = []
x=[]
y=[]
m=int(input())
for i in range(m):
a.append(list(map(int,input().split())))
sum1=0
for i in range(m):
for j in range(m):
sum1+=a[i][j]
if sum1%2!=0:
x.append(i)
sum1=0
sum2=0
for i in range(m):
for j in range(m):
sum2+=a[j][i]
if sum2%2!=0:
y.append(i)
sum2=0
if len(x)==1 and len(y)==1:
print(x[0]+1,end=' ')
print(y[0]+1)
else:
if len(x)==0 and len(y)==0:
print("OK")
else:
print("Corrupt")