A. Okabe and Future Gadget Laboratory
# Time : 2017-6-26 10:30
# Auther : Anjone
# URL : http://codeforces.com/contest/821/problem/A
n = int(input())
arr = [ list(map(int,input().split())) for i in range(n)]
for i in range(n):
for j in range(n):
if( arr[i][j] != 1):
cnt = 0
for k in range(n):
for l in range(n):
if(arr[i][k] + arr[l][j] == arr[i][j]):
cnt += 1
if(cnt == 0):
print("No")
exit(0)
print ("Yes")
# Time : 2017-6-26 13:30
# Auther : Anjone
# URL : http://codeforces.com/contest/821/problem/B
# 对于一个确定的y找到最大的x
# x y
# getsum ∑ ( ∑ (i+j) ) = (y+1)*(x+y)*(x+1)/2
# i=0 j=0
getsum = lambda x,y : ( y + 1 ) * ( x + y ) * (x+1) // 2
m,b = map(int,input().split())
ans = 0
for i in range(b+1):
x = (b-i)*m
ans = max(ans, getsum(x,i))
print(ans)
# Time : 2017-6-26 14:30
# Auther : Anjone
# URL : http://codeforces.com/contest/821/problem/C
# 题意 :模拟进栈出栈 要求出栈顺序需要递增
# 思路 :保证当前栈顶元素为num,若不是更新栈排序
# 栈排序后 下次出栈时判断为空 出栈元素必有序
ans = 0
num = 1
stack = []
n = int(input())
for i in range(2*n):
s = input()
if s.find("add") != -1:
stack.append(int(s.split()[1]) )
else:
if len(stack) != 0 and stack[-1] != num:
stack = []
ans+=1
if len(stack):
stack.pop()
num += 1
print(ans)