n = int(input())
white=[[0] * 100 for _ in range(100)]
for i in range(n):
x,y=map(int,input().split())
white[x-1][y-1]=1
for a in range(10):
white[x+a][y+i]=1
for b in range(10):
white[x+i][y+b]=1
print(white[x])
To embed this project on your website, copy the following code and paste it into your website's HTML: