Harryxun/stf_run huggingface dataset:
from collections import deque
import math
import copy
import sys
sys.setrecursionlimit(2147483647)

h,w = map(int, input().split())
maze = [list(map(str,input())) for _ in range(h)]


ans = 0

for i in range(w):
     for j in range(h):
          for k in range(w):
               for l in range(h):

                    maze2 = copy.deepcopy(maze)

                    if maze[j][i] == '#' or maze[l][k] == '#':
                         pass
                    else:
                         sx,sy,gx,gy = i,j,k,l
                         for y in range(h):
                              for x in range(w):
                                   if maze[y][x] == '.':
                                        maze2[y][x] = math.inf


                         maze2[sy][sx]=0
                         que=deque([[sy,sx]])
                         while que:
                              y,x=que.popleft()
                              for m,n in [(1,0),(0,1),(-1,0),(0,-1)]:
                                   nexty,nextx=y+m,x+n
                                   if  nexty in range(h) and nextx in range(w):
                                        dist=maze2[nexty][nextx]
                                        if dist!='#':
                                             if dist>maze2[y][x]+1:
                                                  maze2[nexty][nextx]=maze2[y][x]+1
                                                  que.append([nexty,nextx])
                         if ans < maze2[gy][gx]:
                              ans = maze2[gy][gx]

print(ans)

### FIXED CODE ###

h,w = map(int,input().split())
s = [0] * h
for i in range(h):
    s[i] = str(input())

def warshall_floyd(d):
    #d[i][j]: iからjへの最短距離
    for k in range(w*h):
        for i in range(w*h):
            for j in range(w*h):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d


d = [[float("inf")] * (h * w) for i in range((h * w))]
#d[u][v] : 辺uvのコスト(存在しないときはinf)
for i in range(h):
    for j in range(w):
        if s[i][j] == '.':
            a = i * w + j
            d[a][a] = 0
            for m, n in [(1, 0), (0, 1), (-1, 0), (0, -1)]:
                ss = i + m
                t = j + n
                if 0 <= ss <= h-1 and 0 <= t <= w-1 and s[ss][t] == '.':
                    b = ss * w + t
                    d[a][b] = 1
                    d[b][a] = 1
     #自身のところに行くコストは０
ans = 0
box = warshall_floyd(d)
for i in range(h * w):
    for j in range(h*w):
        if box[j][i] > 1000000:
            box[j][i] = 0
        ans = max(ans,box[j][i])

print(ans)
a,b,c = map(int,input().split())
print( min(b//a,c)

### FIXED CODE ###

a,b,c = map(int,input().split())
print( min(b//a,c) )
S = input()
if S == 'Sunny':
  print('Cloudy')
else if S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

### FIXED CODE ###

S = input()
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')
S = list(map(int,input().split()))
N=S[0]
M=S[1]
N1=0
M1=0
count = 0
if N<2*M:
    count += N
    N1=0
    M1=M-2*N
else:
    count += M//2
    N1 =N-M//2
    M1 =M-(M//2)*2
    
for i in range(N1):
    if N1 ==0 or M1<=1:
        break
    N1=N1-1
    M1=M1-2
    count += 1
if N1==0:
    for i in range(M1):
        if M1>=4:
            M1 -= 4
            count += 1
        if M1<4:
            break
print(count)
        

### FIXED CODE ###

N=int(input())

x=N*800
y=200*(N//15)
print(x-y)
n=int(input())
ba,a,b,ab=0,0,0,0
for i in range(n):
    s=input()
    if s[0]=='B' and s[-1]=='A':
        ba+=1
    elif s[0]=='B':
        b+=1
    elif s[-1]=='A':
        a+=1
    for i in range(len(s)-1):
        if s[i]=='A' and s[i+1]=='B':
            ab+=1

print(min(a,b)+x+ab)


### FIXED CODE ###

n=int(input())
ba,a,b,ab=0,0,0,0
for i in range(n):
    s=input()
    if s[0]=='B' and s[-1]=='A':
        ba+=1
    elif s[0]=='B':
        b+=1
    elif s[-1]=='A':
        a+=1
    for i in range(len(s)-1):
        if s[i]=='A' and s[i+1]=='B':
            ab+=1
if a==b and a==0 and ba!=0:
	ba-=1
print(min(a,b)+ba+ab)
N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7
A.sort()
B = []

if len(A) % 2 == 0:
    ans = 2 ** (len(A)/2)
    for i in range(len(A)//2):
        B.append(2 * i + 1)
        B.append(2 * i + 1)

else:
    ans = 2 ** (len(A)//2)
    B.append(0)
    for i in range(len(A)//2):
        B.append(2 * i + 2)
        B.append(2 * i + 2)

if A == B:
    print(int(ans))
else:
    print(0)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7
A.sort()
B = []

ans = 1

if len(A) % 2 == 0:
    for i in range(len(A)//2):
        ans *= 2
        ans %= MOD
        B.append(2 * i + 1)
        B.append(2 * i + 1)

else:
    B.append(0)
    for i in range(len(A)//2):
        ans *= 2
        ans %= MOD
        B.append(2 * i + 2)
        B.append(2 * i + 2)

if A == B:
    print(int(ans))
else:
    print(0)
from math import gcd

k = int(input())
ans = 0

for a in range(1,k+1):
    if i == 1:
        ans += k*k
        continue
    for b in range(1,k+1):
        n = gcd(a,b)
        if n == 1:
            ans += k
            continue
        for c in range(1,k+1):
            ans += gcd(n,c)
print(ans)


### FIXED CODE ###

from math import gcd

k = int(input())
ans = 0

for a in range(1,k+1):
    for b in range(1,k+1):
        n = gcd(a,b)
        for c in range(1,k+1):
            ans += gcd(n,c)
print(ans)
#include<bits/stdc++.h>
using namespace std;
int main(){
	char a;
	cin>>a;
	switch(a){
		case "A":cout<<"T"<<endl;break;
		case "T":cout<<"A"<<endl;break;
		case "C":cout<<"G"<<endl;break;
		case "G":cout<<"C"<<endl;break;
	}
	return 0;
}


### FIXED CODE ###

a = input()
if a == "T":
  print("A")
elif a=="A":
  print("T")
elif a=="C":
  print("G")
else:
  print("C")
# sympyをインポート
import sympy
N = int(input())
print(int(list(map(sympy.divisor_count,list(range(1,N + 1))[:: 2])).count(8)))

### FIXED CODE ###

import math

N = int(input())

def make_prime_list(num):
    if num < 2:
        return []

    prime_list = [i for i in range(num + 1)]
    prime_list[1] = 0 
    num_sqrt = math.sqrt(num)

    for prime in prime_list:
        if prime == 0:
            continue
        if prime > num_sqrt:
            break

        for non_prime in range(2 * prime, num, prime):
            prime_list[non_prime] = 0

    return [prime for prime in prime_list if prime != 0]

def search_divisor_num(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list(num_sqrt)

        divisor_num = 1
        for prime in prime_list:
            count = 1
            while num % prime == 0:
                num //= prime
                count += 1
            divisor_num *= count

        if num != 1:
            divisor_num *= 2

        return divisor_num


print(int(list(map(search_divisor_num,list(range(1,N + 1))[:: 2])).count(8)))
n = int(input())
z = list(int(input().split()))
odd = 0
for i in range(n):
    if i % 2 == 1:
        if int(z[i]) % 2 == 1:
            odd += 1
print(odd)

### FIXED CODE ###

n = int(input())
z = input().split()
odd = 0
for i in range(n):
    if i % 2 == 0:
        if int(z[i]) % 2 == 1:
            odd += 1
print(odd)
N = int(input())
A = list(map(int, input().split()))

# print(A)
c = [0, 0, 0]
# r = 0
# b = 0
# g = 0
sum = 1
# print(c)
for a in A:
    # print(a)
    if a == c[0]:
        c[0] += 1
        tmp = c.count(c[0] - 1) + 1
    elif a == c[1]:
        c[1] += 1
        tmp = c.count(c[1]-1) + 1
    elif a == c[2]:
        c[2] += 1
        tmp = c.count(c[2] - 1) + 1
    # print(tmp)
    sum *= tmp
    # print(c)
print(sum)

### FIXED CODE ###

N = int(input())
A = map(int, input().split())
MOD = 1000000007
ans = 1
cnt = [3 if i == 0 else 0 for i in range(N + 1)]
 
for a in A:
    ans = ans * cnt[a] % MOD
    if ans == 0:
        break
    cnt[a] -= 1
    cnt[a+1] += 1
 
print(ans)
import numpy as np
import copy

N= int(input())
S=input()
SS= copy.copy(S)
S = list(S)
#N, A, B = map(int, input().split())

flag = 1
#print(len(S))
while flag == 1:
    flag = 0
    flag2 = 1
    i = 0
    while flag2:
    # for i in range(len(S)-1):
        #print(S)
        #print(i)
        if S[i]=="(" and S[i+1] ==")":
            # print(S, i)
            flag = 1
            del S[i] 
            del S[i]
            i -= 1
            # print(S, i)
        i += 1
        i = max(0,i)
        #print(i, len(S))
        if i+1>=len(S):
            flag2 = 0
a=0
b=0
print(S)
for i in range(len(S)):
    if S[i]=="(":
        b+=1
    elif S[i]==")":
        a+=1
#print(S)
# initialization of string to ""
A = ""
B = ""

# traverse in the string
for x in range(a):
    
    A += "("   
for x in range(b):    
    B += ")"   

        
#print(str(A)+SS+str(B))
print(A+SS+B)
    



### FIXED CODE ###

import numpy as np
import copy

N= int(input())
S=input()
SS= copy.copy(S)
S = list(S)
#N, A, B = map(int, input().split())

flag = 1
#print(len(S))
while flag == 1:
    flag = 0
    flag2 = 1
    i = 0
    while flag2 and len(S)>1:
    # for i in range(len(S)-1):
        #print(S)
        if S[i]=="(" and S[i+1] ==")":
            # print(S, i)
            flag = 1
            del S[i] 
            del S[i]
            i -= 1
            # print(S, i)
        i += 1
        i = max(0,i)
        if i+1>=len(S):
            flag2 = 0
a=0
b=0
for i in range(len(S)):
    if S[i]=="(":
        b+=1
    elif S[i]==")":
        a+=1
#print(S)
# initialization of string to ""
A = ""
B = ""

# traverse in the string
for x in range(a):
    
    A += "("   
for x in range(b):    
    B += ")"   

        
#print(str(A)+SS+str(B))
print(A+SS+B)
# AGC 025 A - Digits Sum
N = int(input())

def sum_of(num): #各位の合計値を返す
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num % 10)
        num = num // 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
for i in range(N-2):
    A = i + 2
    B = N - i - 2   
    list_a.append(sum_of(A) + sum_of(B))
    
print(min(list_a))

### FIXED CODE ###

N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num%10)
        num //= 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
if N == 2:
    print(str(2))
if N == 3:
    print(str(3))
if N >= 4:
    for i in range(2,N-1):
        A = i
        B = N - i
        list_a.append(sum_of(A) + sum_of(B))
    print(min(list_a))
A = int(input())
print("%h:%m:%s" % (A/3600,A%3600/60,A%60))


### FIXED CODE ###

A = int(input())
print("%d:%d:%d"%(A/3600,(A%3600)/60,A%60))
n = int(input())
l = list(map(int, input().split()))
a = 0
for m in range(n):
    k = l.count(m+1)
    a += int(k*(k-1)/2)
for m in range(n):
    print(a-l.count(l[m])+1)

### FIXED CODE ###

n, m = map(int, input().split())
print(int(n*(n-1)/2+m*(m-1)/2))
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

# print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
 
print(arr[max_index])

### FIXED CODE ###

N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

# print(nums)

max = 0
for k in range(N):
    if nums[k] > max:
        max_index = k
        max = nums[k]
    elif N == 1:
        max_index=0
 
print(arr[max_index])
(a+b)*h/2


### FIXED CODE ###

a=int(input())
b=int(input())
h=int(input())
ans =  (a+b)*h//2
print(ans)
N=int(input())
S=input()
S=S+'#'
sc=0
tc=0
ans=0
for i in range(N+1):
    if(tc!=0 and S[i]=='#'):
        if(sc>tc):
            ans+=tc
            sc+=tc
        else:
            ans+=sc
            sc=0
        tc=0

    if(sc!=0 and S[i]=='.'):
        tc+=1
    elif(tc==0 and S[i]=='#'):
        sc+=1
print(str(ans))







### FIXED CODE ###

a,b,c=map(int,input().split(" "))
if(a>b):
    n=a
    a=b
    b=n
if(c>a and c<b):
    print('Yes')
else:
    print('No')
x=int(input()replace(" ",""))
if int((x**.5))**2==x:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

x=int(input().replace(" ",""))
if int(x**.5)**2==x:
  print("Yes")
else:
  print("No")
count = 0
boolean = True
while (boolean):
    count += 1
    i_arr = []
    j_arr = []
    for i in range(num_i):
        for j in range(num_j):
            if (x[i][j] == "#"):
                i_arr.append(i)
                j_arr.append(j)
    for i, j in zip(i_arr, j_arr):
        if (i == 0) & (j == 0):
            x[1][0] = "#"
            x[0][1] = "#"
        elif (i == num_i - 1) & (j == num_j - 1):
            x[i - 1][j] = "#"
            x[i][j - 1] = "#"
        elif (i == num_i - 1) & (j == 0):
            x[i - 1][0] = "#"
            x[i][1] = "#"
        elif (i == 0) & (j == num_j - 1):
            x[1][j] = "#"
            x[0][j - 1] = "#"
        elif (i == 0):
            x[1][j] = "#"
            x[0][j - 1] = "#"
            x[0][j + 1] = "#"
        elif (j == 0):
            x[i - 1][0] = "#"
            x[i + 1][0] = "#"
            x[i][1] = "#"
        elif (i == num_i - 1):
            x[i - 1][j] = "#"
            x[i][j + 1] = "#"
            x[i][j - 1] = "#"
        elif (j == num_j - 1):
            x[i - 1][j] = "#"
            x[i + 1][j] = "#"
            x[i][j - 1] = "#"
        else:
            x[i - 1][j] = "#"
            x[i + 1][j] = "#"
            x[i][j - 1] = "#"
            x[i][j + 1] = "#"
    if len(set(list(x.flatten()))) == 1:
        print(count)
        boolean = False
    else:
        boolean = True

### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())

# input black cells
black_cells = []

for h in range(H):
    line = list(input())
    for w in range(W):
        if line[w] == "#":
            black_cells.append(h * W + w)


# Graph
def r(p):
    q_list = []
    h = p // W
    w = p % W
    if h != 0:
        q_list.append(p - W)
    if h != H-1:
        q_list.append(p + W)
    if w != 0:
        q_list.append(p - 1)
    if w != W-1:
        q_list.append(p + 1)
    return q_list


queue = deque(black_cells)
d = [10000] * (H * W)
for i in black_cells:
    d[i] = 0

# dijkstra
while len(queue) > 0:
    p = queue.popleft()
    for q in r(p):
        if d[q] > d[p] + 1:
            d[q] = d[p] + 1
            queue.append(q)

print(max(d))
a,b=map(int,input().split())
if a<=b:
  for i in range(b):
    print(a)
else:
    for i in range(a):
    print(b)

### FIXED CODE ###

a,b=map(int,input().split())
if a<=b:
	print(int(a*(10**(b)-1)/9))
else:
	print(int(b*(10**(a)-1)/9))
n,m,r=map(int,input().split())
road=list(map(int,input().split()))
cost=[[float("inf")]*n for i in range(n)]
for i in range(m):
    cost[i][i]=0
    a,b,c=map(int,input().split())
    a,b=a-1,b-1
    cost[a][b]=c
    cost[b][a]=c
for k in range(n):
    for i in range(n):
        for j in range(n):
            cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
import itertools
ans=float("inf")
for i in itertools.permutations(road):
    tmp=0
    for j in range(len(i)-1):
        tmp+=cost[i[j]-1][i[j+1]-1]
    if tmp<ans:
        ans=tmp
print(ans)

### FIXED CODE ###

n,m,r=map(int,input().split())
road=list(map(int,input().split()))
cost=[[float("inf")]*n for i in range(n)]
for i in range(n):
    cost[i][i]=0
for i in range(m):
    
    a,b,c=map(int,input().split())
    a,b=a-1,b-1
    cost[a][b]=c
    cost[b][a]=c
for k in range(n):
    for i in range(n):
        for j in range(n):
            cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
import itertools
ans=float("inf")
for i in itertools.permutations(road):
    tmp=0
    for j in range(len(i)-1):
        tmp+=cost[i[j]-1][i[j+1]-1]
    if tmp<ans:
        ans=tmp
print(ans)
n, m = map(int, input().split())
A = []*m
B = []*m
for i in range(m):
  A[i],B[i] =map(int, input().split())

al = n(n-1)/2
ansl = [al]
d = list(range(m+1))
dl = [[_] for _ in range(m+1)]

for i in range(m-1,0,-1):
  x = d[A[i]]
  y = d[B[i]]
  x,y = max(x,y),min(x,y)
  al -= dl[x]*dl[y]
  for i in range(dl[y]):
    d[i] = x
  dl[x] += dl[y]
  ansl.append(al)
  
for i in range(m-1,-1,-1):
print(ansl[i])

### FIXED CODE ###

n, m = map(int, input().split())
A = [0]*m
B = [0]*m
for i in range(m):
  A[i],B[i] =map(int, input().split())

al = n*(n-1)//2
ansl = [al]
d = list(range(n+1))
dl = [[_] for _ in range(n+1)]

for i in range(m-1,0,-1):
  x = d[A[i]]
  y = d[B[i]]
  x,y = max(x,y),min(x,y)
  if x > y:
    al -= len(dl[x])*len(dl[y])
    for i in dl[y]:
      d[i] = x
    dl[x] += dl[y]
  ansl.append(al)

for i in range(m-1,-1,-1):
  print(int(ansl[i]))
h, w = map(int, input().split())
s = []
for i in range(h):
    s_ = input()
    s.append(s_)

b = [[False]*w]*h

for i in range(h):
    for j in range(w):
        if s[j][i] == '#':
            if j + 1 < w and s[j+1][i] == '#':
                continue
            if j - 1 >= 0 and s[j-1][i] == '#':
                continue
            if i + 1 < h and s[j][i+1] == '#':
                continue
            if i - 1 >= 0 and s[j][i-1] == '#':
                continue
            print('No')
            exit()

print('Yes')

### FIXED CODE ###

h, w = map(int, input().split())
s = []
for i in range(h):
    s_ = input()
    s.append(s_)

for i in range(w):
    for j in range(h):
        if s[j][i] == '#':
            if j + 1 < h and s[j+1][i] == '#':
                continue
            if j - 1 >= 0 and s[j-1][i] == '#':
                continue
            if i + 1 < w and s[j][i+1] == '#':
                continue
            if i - 1 >= 0 and s[j][i-1] == '#':
                continue
            print('No')
            exit()

print('Yes')
import sys
if __name__ == '__main__':
    N,x = list(map(int,input().split()))
    if 1 < x < 2*N - 1:
        print('Yes')
        L = [i+1 for i in range(2*N - 1)]
        if N == 2:
            for i in L:
                print(i)
        else:
            L[L.index(x+1)],L[N-2] = L[N-2],x+1
            L[L.index(x)],L[N-1] = L[N-1],x
            L[L.index(x-1)],L[N] = L[N],x-1
            L[L.index(x+2)],L[N+1] = L[N+1],x+2
            for i in L:
                print(i)
    else:
        print('No')


### FIXED CODE ###

import sys
if __name__ == '__main__':
    N,x = list(map(int,input().split()))
    if 1 < x < 2*N - 1:
        print('Yes')
        for i in range(2*N - 1):
            print(1+ ((x-N+i)%(2*N - 1)))
    else:
        print('No')
X = int(input())

for A in range(-10,100+1):
  for B in range(-10,100+1):
    if(A**5 - B**5 == X):
      ans = [A,B] 
      
print(ans[0],ans[1])    

### FIXED CODE ###

X = int(input())

for A in range(0,10**3):
 for B in range(0,10**3):
  A1,A2,B1,B2 = A,-A,B,-B
  if(A1**5-B1**5 == X):
    ans = [A1,B1]
    break
  elif(A1**5-B2**5 == X):
    ans = [A1,B2]
    break
  elif(A2**5-B1**5 == X):
    ans = [A2,B1]
    break  
  elif(A2**5-B2**5 == X):
    ans = [A2,B2]
    break    
            
print(ans[0],ans[1])
a, b = [int(i) for i in input().split()]
area = a * b
perimeter =  2 * (a + b)
print(area & " " & perimeter)

### FIXED CODE ###

a, b = [int(i) for i in input().split()]
area = a * b
perimeter = 2 * (a + b)
print(area, perimeter, sep=" ")
#出典
#http://d.hatena.ne.jp/mzp/20100623/lcs
#ここから完全にコピペしました
def maxBy(f, x, y):
    if f(x) > f(y):
        return x
    else:
        return y

table = { ("","") : "" }

def lcs(xs,ys):
    if (xs,ys) in table:
        return table[(xs,ys)]

    ret = ""
    if xs == "" or ys == "":
        ret = ""
    elif xs[-1] == ys[-1]:
        ret = lcs(xs[:-1],ys[:-1]) + xs[-1]
    else:
        ret = maxBy(len,
                    lcs(xs[:-1],ys),
                    lcs(xs,ys[:-1]))
    table[(xs,ys)] = ret
    return ret
S=input()
T=input()
print(lcs(S,T))


### FIXED CODE ###

S=input()
T=input()
a=[ord(i) for i in S]
b=[ord(i) for i in T]
N=len(a);M=len(b)
X=[[0 for j in range(M+1)] for i in range(N+1)]
Y=[[0 for j in range(M+1)] for i in range(N+1)]
for i in range(N):
    for j in range(M):
        if a[i]==b[j]:
            X[i+1][j+1]=X[i][j]+1
            Y[i+1][j+1]=0
        elif X[i+1][j]<X[i][j+1]:
            X[i+1][j+1]=X[i][j+1]
            Y[i+1][j+1]=+1
        else:
            X[i+1][j+1]=X[i+1][j]
            Y[i+1][j+1]=-1
c=[]
i=N;j=M
while(i>0 and j>0):
    if Y[i][j]>0:
        i-=1
    elif Y[i][j]<0:
        j-=1
    else:
        c.append(a[i-1])
        i-=1
        j-=1
print("".join([chr(i) for i in c[::-1]]))
N = int(input())
A = list(map(int, input().split()))

A_ = sorted(A)

if len(A_) == 1:
    if A_[0] == 0:
        print(1)
    else:
        print(0)

else:

    if len(A_) % 2 == 0:
        if A_[0] != 0 or A_[1] != 0:
            print(0)
            exit()

    else:
        if A_[0] != 0 or A_[1] == 0:
            print(0)
            exit()





    for i in range(len(A_) // 2):
        if A_[2*i] != A_[2*i+1]:
            print(0)
            exit()


    ans_ = 2 ** (N // 2)
    ans = ans_ % (10**9 + 7)
    print(ans)


### FIXED CODE ###



a, o, b = input().split()
a = int(a)
b = int(b)

if o == '+':
    print(a+b)
elif o == '-':
    print(a-b)
MOD = 10**9 + 7
N, M = map(int,input().split())
a = set(int(input()) for _ in range(M))

dp = [0] * N
if 1 in a:
    dp[0] = 0
    if 2 in a:
        dp[0] = 0
    else:
        dp[1] = 1
else:
    dp[0] = 1
    if 2 in a:
        dp[1] = 0
    else:
        dp[1] = 2

for i in range(2, N):
    if i+1 not in a:
        dp[i] = (dp[i-1] + dp[i-2]) % MOD
print(dp[-1])


### FIXED CODE ###

MOD = 10**9 + 7
N, M = map(int,input().split())
a = set(int(input()) for _ in range(M))
dp = [0] * (N+1)
dp[0] = 1

for i in range(1, N+1):
    if i not in a and i > 1:
        dp[i] = (dp[i-1] + dp[i-2]) % MOD
    elif i not in a and i == 1:
        dp[i] = dp[i-1]
print(dp[-1])
n,m = map(int,input().split())
possible = [0]*n
kosuu = [1]*n
possible[0] = 1
L = []

for i in range(m):
    x,y = map(int,input().split())
    L.append((x,y))

for i in range(idx,m):
    x,y = L[i][0],L[i][1]
    x,y = x-1,y-1
    if kosuu[x] >=2 and possible[x] == 1:
        possible[y] = 1
        kosuu[x] -=1
        kosuu[y] +=1
    elif kosuu[x] == 1 and possible[x] == 1:
        possible[x] = 0
        possible[y] = 1
        kosuu[x] = 0
        kosuu[y] +=1
    elif kosuu[x] >=2 and possible[x] == 0:
        kosuu[x] -=1
        kosuu[y] +=1
    elif kosuu[x] == 1 and possible[x] == 0:
        kosuu[x] = 0
        kosuu[y] +=1
        
print(sum(possible))

### FIXED CODE ###

n,m = map(int,input().split())
possible = [0]*n
kosuu = [1]*n
possible[0] = 1
L = []

for i in range(m):
    x,y = map(int,input().split())
    L.append((x,y))

for i in range(m):
    x,y = L[i][0],L[i][1]
    x,y = x-1,y-1
    if kosuu[x] >=2 and possible[x] == 1:
        possible[y] = 1
        kosuu[x] -=1
        kosuu[y] +=1
    elif kosuu[x] == 1 and possible[x] == 1:
        possible[x] = 0
        possible[y] = 1
        kosuu[x] = 0
        kosuu[y] +=1
    elif kosuu[x] >=2 and possible[x] == 0:
        kosuu[x] -=1
        kosuu[y] +=1
    elif kosuu[x] == 1 and possible[x] == 0:
        kosuu[x] = 0
        kosuu[y] +=1
print(sum(possible))
input_list = map(int, input().split())

flag = False
for idx in input_list:
  if idx>=1 and idx<=100:
    flag = True
  if flag is False:
    break
  
turn = 0
if flag:
  A, B, C, D = input_list
  continue_flag = True
  while continue_flag:
    if turn%2==0:
      C -= B
      if C<=0:
        print("Yes")
        continue_flag = False
      turn += 1
    else:
      A -= D
      if A<=0:
        print("No")
        continue_flag = False
      turn += 1
      
      

### FIXED CODE ###

input_list = list(map(int, input().split()))

flag = False
for idx in input_list:
    if idx>=1 and idx<=100:
        flag = True
    if flag is False:
        break
  
turn = 0
if flag:
    A, B, C, D = input_list
    continue_flag = True
    while continue_flag:
        if turn%2==0:
          C -= B
          if C<=0:
            print("Yes")
            continue_flag = False
          turn += 1
        else:
          A -= D
          if A<=0:
            print("No")
            continue_flag = False
          turn += 1