# list = [list(map(int,input().split())) for i in range(11)]
# cnt1 = 0
# cnt2 = 0
# for j in range (10):
# if list[10][j] == 1:
# for i in range(9,-1,-1):
# if list[i][j] < 0:
# print(j+1,'fall')
# break
# elif list[i][j]>0:
# print(j+1,'crash')
# break
# elif i==0:
# print(j+1,'safe')
# break
# list = [[0 for j in range (101)] for i in range(101)]
# n = int(input())
# cnt = 0
# for h in range (n):
# a,b = map(int,input().split())
# for i in range(b,b+10):
# for j in range (a,a+10):
# if list[i][j] == 0:
# list[i][j] = 1
# cnt+=1
# print(cnt)
# list = [[0 for j in range (101)] for i in range (101)]
# cnt = 0
# for h in range (4):
# a,b,c,d = map (int,input().split())
# for i in range (b,d):
# for j in range(a,c):
# if list[i][j] == 0:
# list[i][j] = 1
# cnt+=1
# print(cnt)
# a,n = map(int,input().split())
# list = [[0 for j in range(n+1)] for i in range (a+1)]
# b = input()
# b = int(b)
# cnt = 0
# for h in range (b):
# c,d,e,f = map(int,input().split())
# if d==0:
# for j in range(f,f+c):
# list[e][j] = 1
# if d == 1:
# for i in range(e,e+c):
# list[i][f] = 1
#
# for i in range(1,a+1):
# for j in range(1,n+1):
# print(list[i][j], end=' ')
# print()