Harryxun/stf_run huggingface dataset:
n = int(input())
a = list(map(int,input().split()))
a.sort()
b = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 
     131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 
     67108864, 134217728, 268435456, 536870912]

t = []
bIdx = 0
for aa in a :
    while b[bIdx] <= aa:
        bIdx += 1   
    t.append(b[bIdx]-aa)

t.reverse()
a.sort(reverse=True)

sum = 0
i = 0

#print(t,a)

while True:
    
    first = i+1
    last = len(a)-1
    found = False

    while first<=last and not found:
        midpoint = (first + last)//2
        if a[midpoint] == t[i] :
            found = True
            sum += 1
            a.pop(midpoint)
            #print(a)
        else:
            if t[i] > a[midpoint]:
                last = midpoint-1
            else:
                first = midpoint+1
            
    i = i + 1
    if i >= len(a)-1:
        break

print(sum)

### FIXED CODE ###

from bisect  import bisect_left

n = int(input())
a = list(map(int,input().split()))
a.sort()
#print(a)

sum = 0
for i in range (len(a)-1,-1,-1):

    b = 1
    while b <= a[i]:
        b = b<<1
    t = b - a[i]
    #print("2^",t)

    k = bisect_left(a,t)
    if a[k] == t and k < i:
        sum += 1
        a[k] -= 0.1
        a[i] += 0.1
print(sum)
N,X=map(int,input().split(" "))
L=[int(s) for s in input().split(" ")]

Sum=0
Count=0
while Sum<=X and Count<N+1:
    Sum+=L[Count]
    Count+=1
    
print(Count)

### FIXED CODE ###

N,X=map(int,input().split(" "))
L=[int(s) for s in input().split(" ")]

bound_List=[0]
for i in range(N):
    bound_List.append(L[i]+bound_List[i])

count=0
for i in bound_List:
    if i<=X:
        count+=1
        
print(count)
s=str(input())
price=700

for i in range(s.size):
  if s[i]=="o":
    price+=100

print(price)

### FIXED CODE ###

S=list(input())
count=0

if S[0]=='o':
  count+=1
if S[1]=='o':
  count+=1
if S[2]=='o':
  count+=1
  
print(count*100+700)
N = int(input())
A = [int(input()) for i in range(N)]
Next = 0
for i in range(N):
  if Next == 2:
    Next = A[Next]
    p = i
    break;
  else:
    Next = A[Next-1]
    p = -1
print(p)

### FIXED CODE ###

N = int(input())
A = [int(input()) for i in range(N)]
Next = 1
for i in range(N):
  if Next == 2:
    Next = A[Next-1]
    p = i
    break;
  else:
    Next = A[Next-1]
    p = -1
print(p)
a,b=map(int,input().split());print({a/2+b/2,"IMPOSSIBLE"}[(a+b)%2])

### FIXED CODE ###

a=sum(map(int,input().split()));print(a%2*'IMPOSSIBLE'or a//2)
n,l=map(int,input().split())
s=[input() for i in range(n)]
print("".join(sorted(s)))


### FIXED CODE ###

print(["NO","YES"][eval(input().replace(" ","*"))==175])
while(1):
  count = input()
  if count == 0: break
  original_cube = [1, 2, 3, 4, 5, 6]
  operation{'North':[2, 6, 3, 4, 1, 5], 'East':[4, 2, 1, 6, 5, 3], 'West': [3, 2, 6, 1, 5, 4], 'South':[5, 1, 3, 4, 6, 2], 'Right':[1, 3, 5, 2, 4, 6], 'Left[1, 4, 2, 5, 3, 6]}
  new_cube = []
  sum = 0
  for i in xrange(count):
    for e in operation[input()]:
      new_cube.append(previous_cube[e])
    sum += new_cube[0]
    previous_cube = new_ccube
    new_cube = []
  print sum

### FIXED CODE ###

while 1:
  n = input()
  if n == 0:  break
  d = range(1, 7)
  ans = 1
  for i in range(n):
    c = raw_input()[0]
    if c == 'N': S = [1,5,2,3,0,4]
    elif c == "S": S = [4,0,2,3,5,1]
    elif c == "E": S = [3,1,0,5,4,2]
    elif c == "W": S = [2,1,5,0,4,3]
    elif c == "R": S = [0,2,4,1,3,5]
    elif c == "L": S = [0,3,1,4,2,5]
    d = [d[s] for s in S]
    ans += d[0]
  print ans
# -*- coding: utf-8 -*-

A, B = map(int, input().split())

a = int(A*100/8)
b = int(B*100/10)

x = int(a*0.10)
y = int(b*0.08)

if x == B and y == A:
    if a < b:
        print(a)
    else:
        print(b)
elif x == B:
    print(a)
elif y == A:
    print(b)
else:
    print(-1)


### FIXED CODE ###

# -*- coding: utf-8 -*-

S = input()

if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")
#3_1_1
import bisect
n = int(input())
a = list(map(int,input().split))
b = list(map(int,input().split))
c = list(map(int,input().split))

a.sort()
c.sort()
ans = 0
for i in range(n):
    ue = bisect.bisect_left(a,b[i])
    sita = bisect.bisect_right(c,b[i])
    ans += ue * sita
print(ans)

### FIXED CODE ###

#3_1_1
import bisect
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

a.sort()
c.sort()
ans = 0
for i in range(n):
    ue = bisect.bisect_left(a,b[i])
    sita = n - bisect.bisect_right(c,b[i])
    ans += ue * sita
print(ans)
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

U = 10**6
is_prime = np.zeros(U, np.bool_)
is_prime[2] = 1
is_prime[3::2] = 1
for p in range(3, U, 2):
    if p * p >= U:
        break
    if is_prime[p]:
        is_prime[p * p::p + p] = 0

primes = is_prime.nonzero()[0]


def factor(N):
    div = primes[N % primes == 0]
    for p in div:
        e = 0
        while N % p == 0:
            e += 1
            N //= p
        yield (p, e)
    if N != 1:
        yield (N, 1)


A = np.zeros(100, np.int32)
for i in range(14):
    k = i * (i + 1) // 2
    A[k] = i
np.maximum.accumulate(A, out=A)

x = 0
for p, e in factor(N):
    x += A[e]
print(x)


### FIXED CODE ###

from collections import defaultdict
from math import gcd
import time
import sys
from collections import Counter
import itertools
import math
from decimal import *
# read = sys.stdin.buffer.read
# readline = sys.stdin.buffer.readline
# readlines = sys.stdin.buffer.readlines
input = sys.stdin.readline

temp = input().split(" ")
a = Decimal(temp[0])
b = Decimal(temp[1])
ans = a*b
print(math.floor(ans))
s,t = input().split()
a,b = map(int, input().split())
u   = input()

if s == u:
    print(f'{a-1} {b}')
else:
    print(f'{a} {b-1}')


### FIXED CODE ###

s,t =input().split()
a,b = map(int, input().split())
u = input()


if u == s:
    print(a-1, b)
elif u == t:
    print(a, b-1)
import sys
input = sys.stdin.readline()
N = int(input())
abc = [[0,0,0]]+[list(map(int,input().split())) for _ in range(N)]
dp = [[0,0,0] for _ in range(N+1)]

for i in range(1,N+1):
    for j in range(3):
        for k in range(3):
            if j == k:continue
            #print('i={},j={},k={}'.format(i,j,k))
            #print(dp[i][j],abc[i][j],abc[i-1][k])
            dp[i][j] = max(dp[i][j],abc[i][j]+dp[i-1][k])
print(max(dp[-1]))

### FIXED CODE ###

import sys
input = sys.stdin.readline
N = int(input())
abc = [[0,0,0]]+[list(map(int,input().split())) for _ in range(N)]
dp = [[0,0,0] for _ in range(N+1)]

for i in range(1,N+1):
    for j in range(3):
        for k in range(3):
            if j == k:continue
            #print('i={},j={},k={}'.format(i,j,k))
            #print(dp[i][j],abc[i][j],abc[i-1][k])
            dp[i][j] = max(dp[i][j],abc[i][j]+dp[i-1][k])
print(max(dp[-1]))
a,b,x = list(map(int, input().split()))

if (a >= x) and (a+b <= X):
    print('YES')
else:
    print('NO')

### FIXED CODE ###

a,b,x = list(map(int, input().split()))

if (a <= x) and (a+b >= x):
    print('YES')
else:
    print('NO')
from fraction import gcd
from functools import reduce
input()
print(reduce(gcd,list(map(int,input().split()))))

### FIXED CODE ###

from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)
n = raw_input()
a = map(int raw_input().split())
print (%d %d %d) % (min(a), max(a), sum(a))

### FIXED CODE ###

n = raw_input()
a = map(int, raw_input().split())
print ("%d %d %d") % (min(a), max(a), sum(a))
a=int(input())
b=int(input())
c=int(input())
n=int(input())
ans=0
for i in range(a):
  for j in range(b):
    if 500*i+100*j>n:
      break
    else:
      (n-500*i-100*j)%50==0 and (n-500*i-100*j)//50<=c:
        ans+=1
  if 500*i>n:
    break
print(ans)

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
n=int(input())
ans=0
for i in range(a+1):
  for j in range(b+1):
    if 500*i+100*j>n:
      break
    else:
      if(n-500*i-100*j)%50==0 and (n-500*i-100*j)//50<=c:
        ans+=1
  if 500*i>n:
    break
print(ans)
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(fabs(b-a-w))
elif b+w < a:
    print(fabs(b+w-a))
else:
    print(0)

### FIXED CODE ###

import math
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(int(math.fabs(b-a-w)))
elif b+w < a:
    print(int(math.fabs(b+w-a)))
else:
    print(int(0))
n, m = map(int, input().split())
g = [[] for _ in range(n+1)]
for _ in range(m):
    a, b = map(int, input().split())
    g[a-1].append(b-1)
vis = {}
def dfs(i):
    if i in vis: return vis[i]
    vis[i] = True
    vis[i] = any(map(dfs, g[i]))
    return vis[i]
print(any(map(dfs, range(n)))-1)

### FIXED CODE ###

n, m = map(int, input().split())
g = [[] for _ in range(n+1)]
for _ in range(m):
    a, b = map(int, input().split())
    g[a].append(b)
vis = {}
vs = []
def dfs(i):
    if i in vis:
        if vis[i]:
            del vs[:vs.index(i)]
        return vis[i]
    vis[i] = True
    vs.append(i)
    for j in g[i]:
        if dfs(j):
            return True
    vis[i] = False
    vs.pop()
    return False
for i in range(n):
    if dfs(i):
        break
else:
    print(-1)
    exit()
dist = {v: i for i, v in enumerate(vs)}
vis = set()
ws = []
nxt = 0
for i in vs:
    if dist[i] < nxt:
        continue
    k = -1
    for j in g[i]:
        if j not in dist or dist[j]<dist[i] and j not in vis:
            continue
        if k == -1:
            k = j
            continue
        dj = (dist[j]-dist[i])%len(vs)
        dk = (dist[k]-dist[i])%len(vs) 
        if dj > dk:
            k, j = j, k
    nxt = dist[k]
    vis.add(i)
    ws.append(i)
    if k in vis:
        del ws[:ws.index(k)]
        break
print(len(ws))
for i in ws:
    print(i)
N = int(input())
A = list(map(int,input().split()))
s = [0]*N
for i in range(N):
    s[i] = s[i-2]+A[i]

dp = [0]*N
dp[1] = max(A[0],A[1])
dp[2] = max(A[0],A[1],A[2])
for n in range(3,N):
    if n%2==1:
        dp[n] = max(A[n]+dp[n-2],s[n-1])
    else:
        dp[n] = max(A[n]+dp[n-2],A[n-1]+dp[n-3],s[n-2])

print(dp[-1])

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
s = [0]*N
for i in range(N):
    s[i] = s[i-2]+A[i]

dp = [0]*N
dp[1] = max(A[0],A[1])
if N>=3:
    dp[2] = max(A[0],A[1],A[2])
for n in range(3,N):
    if n%2==1:
        dp[n] = max(A[n]+dp[n-2],s[n-1])
    else:
        dp[n] = max(A[n]+dp[n-2],A[n-1]+dp[n-3],s[n-2])

print(dp[-1])
N = str(input()) #ここで標準入力

car = ''
if N[-1] == 3:
    car = 'bon'
elif N[-1] == 0 or N[-1] == 1 or N[-1] == 6 N[-1] == 8
    car = 'pon'

print(car)

### FIXED CODE ###

N = str(input()) #ここで標準入力

car = ''
if N[-1] == '3':
    car = 'bon'
elif N[-1] == '0' or N[-1] == '1' or N[-1] == '6' or N[-1] == '8':
    car = 'pon'
else:
    car = 'hon'



print(car)
INF = 10 ** 10
N = 100
n, T = map(int, raw_input().split())

stores = []
zs = []
for i in xrange(n):
    a, b = map(int, raw_input().split())
    if a == 0:
        zs.append(b)
    else:
        stores.append((a, b))

def mycmp(s1, s2):
    a1, b1 = s1
    a2, b2 = s2
    v1 = a2 + a2 * b1
    v2 = a1 + a1 * b2
    return cmp(v1, v2)

stores.sort(cmp=mycmp)

dp = [ [INF for i in xrange(N)] for j in xrange(2) ]
dp[0][0] = 0
res = 0

p = 0
for i in xrange(n):
    q = p ^ 1
    dp[q] = [INF for j in xrange(N)]

    a, b = stores[i]
    for j in xrange(N):
        dp[q][j] = min(dp[q][j], dp[p][j])
        if dp[p][j] == -INF:
            continue
        if j + 1 < N:
            t = dp[p][j] + 1
            dp[q][j + 1] = min(dp[q][j + 1], dp[p][j] + 1 + a * t + b)
            if dp[q][j + 1] <= T:
                res = max(res, j + 1)
    p = q
print res

### FIXED CODE ###

INF = 10 ** 10
N = 100
n, T = map(int, raw_input().split())

stores = []
zs = []
for i in xrange(n):
    a, b = map(int, raw_input().split())
    if a == 0:
        zs.append(b)
    else:
        stores.append((a, b))

def mycmp(s1, s2):
    a1, b1 = s1
    a2, b2 = s2
    v1 = a2 + a2 * b1
    v2 = a1 + a1 * b2
    return cmp(v1, v2)

stores.sort(cmp=mycmp)
stores.append((INF, INF))
zs.sort()

m = len(zs)

for i in xrange(1, m):
    zs[i] += zs[i - 1]

dp = [ [INF for i in xrange(N)] for j in xrange(2) ]
dp[0][0] = 0
res = 0

n = len(stores)

p = 0
for i in xrange(n):
    q = p ^ 1
    dp[q] = [INF for j in xrange(N)]

    a, b = stores[i]
    for j in xrange(N):
        dp[q][j] = min(dp[q][j], dp[p][j])
        if dp[p][j] == -INF:
            continue
        if j + 1 < N:
            t = dp[p][j] + 1
            dp[q][j + 1] = min(dp[q][j + 1], dp[p][j] + 1 + a * t + b)
            if dp[q][j + 1] <= T:
                res = max(res, j + 1)
    for j in xrange(N):
        if dp[q][j] > T:
            continue
        rem = T - dp[q][j] - 1
        l, r = 0, m - 1
        while l <= r:
            mid = (l + r) / 2
            if zs[mid] + mid <= rem:
                res = max(res, j + mid + 1)
                l = mid + 1
            else:
                r = mid - 1
    p = q
print res
import numpy as np
#import math
from fractions import gcd

##get int
first_input = list(map(lambda x:int(x), input().split(" ")))
#second_input = list(map(lambda x:int(x), input().split(" ")))

##get float
#first_input = list(map(lambda x:float(x), input().split(" ")))
#second_input = list(map(lambda x:float(x), input().split(" ")))

##get string
#first_input = input().split(" ")

K = first_input[0]

gcd_sum = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            gcd_sum = gcd_sum + gcd(gcd(a,b),c)

print(gcd_sum)


### FIXED CODE ###

#import numpy as np
import math
#from fractions import gcd

def main():

    ##get int
    first_input = list(map(lambda x:int(x), input().split(" ")))
    #second_input = list(map(lambda x:int(x), input().split(" ")))

    ##get float
    #first_input = list(map(lambda x:float(x), input().split(" ")))
    #second_input = list(map(lambda x:float(x), input().split(" ")))

    ##get string
    #first_input = input().split(" ")

    K = first_input[0]

    gcd_sum = 0
    for a in range(1,K+1):
        for b in range(1,K+1):
            for c in range(1,K+1):
                gcd_sum = gcd_sum + math.gcd(math.gcd(a,b),c)

    print(gcd_sum)

if __name__ == '__main__':
    main()
from fractions import gcd

N = int(input())
A = list(set(map(int, input().split())))

fwd = [A[0]]
for i in range(1, N):
    fwd.append(gcd(fwd[-1], A[i]))

bwd = [A[-1]]
for i in range(N-2, -1, -1):
    bwd.append(gcd(bwd[-1], A[i]))
bwd.reverse()

gmax = max(fwd[-2], bwd[1])
for i in range(1, N-1):
    g = gmax = max(gmax, gcd(fwd[i-1], bwd[i+1]))

print(gmax)


### FIXED CODE ###

from fractions import gcd

N = int(input())
A = list(map(int, input().split()))

fwd = [A[0]]
for i in range(1, N):
    fwd.append(gcd(fwd[-1], A[i]))

bwd = [A[-1]]
for i in range(N-2, -1, -1):
    bwd.append(gcd(bwd[-1], A[i]))
bwd.reverse()

gmax = max(fwd[-2], bwd[1])
for i in range(1, N-1):
    gmax = max(gmax, gcd(fwd[i-1], bwd[i+1]))

print(gmax)
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

s = rr()
print(s[0] + str(len(s-2)) + s[-1])









### FIXED CODE ###

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

s = rr()
print(s[0] + str(len(s) - 2) + s[-1])
def print_ans(l,r,N):
  """print(sum(r)-sum(l)+N)
  Parameters
  --------------
  >>> print_ans([24],[30],1)
  7
  >>> print_ans([6,3],[8,3],2) 
  4
  """
  print(sum(r)-sum(l)+N)


  

def main():
  N = input()
  l = []
  r = []
  for i in range(N):
    s = list(map(int,input().split()))
    l.add(s[0])
    r.add(s[1])

  print_ans(l,r,N)


if __name__ == '__main__':
  main()



### FIXED CODE ###

def print_ans(l,r,N):
  """print(sum(r)-sum(l)+N)
  Parameters
  --------------
  >>> print_ans([24],[30],1)
  7
  >>> print_ans([6,3],[8,3],2) 
  4
  """
  print(sum(r)-sum(l)+N)


  

def main():
  N = int(input())
  l = []
  r = []
  for i in range(N):
    s = list(map(int,input().split()))
    l.append(s[0])
    r.append(s[1])

  print_ans(l,r,N)


if __name__ == '__main__':
  main()
N,*A=map(int,input().split())
print(max((N//min(A)+4),5))

### FIXED CODE ###

import math
n=int(input())
A=[int(input()) for i in range(5)]
m=min(A)
print(math.ceil(n/m)+4)
v = []
m = [False for _ in range(9)]
for i in range(3):
    a, b, c = map(int, input().split())
    v += [a, b, c]

n = int(input())
for i in range(n):
    a = int(input())
    if a in v:
        m[v.index(a)] = True

def control():
    for i in range(3):
        if all(m[3*i:3*i+3]):
            return True
        if all(m[i::3]):
            return True

    if all(m[::4]) or all(m[2:8:2]):
        return True
    return False

print("Yes" if control() else "No")


### FIXED CODE ###

import math

pages = input()
count = int(pages)

if count %2 == 0 :
    print(count/2)
else :
    print((count + 1)/2)
sys.setrecursionlimit(10**5 + 5)

N = int(input())

g = {i: [] for i in range(1, N+1)}

for _ in range(N-1):
    a, b, c = map(int, input().split())
    g[a].append((b, c))
    g[b].append((a, c))

Q, K = map(int, input().split())
xy = []
for _ in range(Q):
    xy.append(tuple(map(int, input().split())))

d = [-1 for _ in range(N+1)]


def dfs(s: int):
    for v, c in g[s]:
        if d[v] == -1:
            d[v] = d[s] + c
            dfs(v)


d[K] = 0
dfs(K)

for x, y in xy:
    print(d[x]+d[y])


### FIXED CODE ###

import sys
sys.setrecursionlimit(100005)

N = int(input())

edges = {n: [] for n in range(N+1)}

for _ in range(N-1):
    a, b, c = map(int, input().split())

    edges[a].append((b, c))
    edges[b].append((a, c))

Q, K = map(int, input().split())
xy = []
for _ in range(Q):
    xy.append(tuple(map(int, input().split())))


d = [-1] * (N+1)
d[K] = 0


def dfs(n: int):
    for m, c in edges[n]:
        if d[m] == -1:
            d[m] = d[n] + c
            dfs(m)


dfs(K)

for x, y in xy:
    print(d[x] + d[y])
#!/usr/bin/env python
 
import sys
 
n= int(sys.stdin.readline())
ai  = [ int(x) for x in sys.stdin.readline().split() ]

mm = dict()
for i,x in enumerate(ai):
    mm[x]= mm.get(x,0) + 1
#
ans= "No"
even= list(filter(lambda i:i % 2 ==0, ai))
odd = len(list(filter(lambda i:i % 2 ==1, ai)))
f= ai.index(max(even))
ll = len(bin(ai[f]))-2
second= []
for i in range(n):
    if i==f: continue
    a= ai[i]
    if len(bin(a))-2!=ll: continue
    if odd:
        if a%2==1: second.append(a)
    else:
        if a%2==0: second.append(a)
#
for s in second:
    tmp= [ai[f],s]
    cnt= { ai[f]:1 }
    cnt[s]= cnt.get(s,0)+1
    for _ in range(2,n):
        nn = tmp[-1] ^ tmp[-2]
        cnt[nn]= cnt.get(nn,0) + 1
        if cnt[nn]>mm.get(nn,0): break
        tmp.append(nn)
    #
    if len(tmp)==n:
        x,y,z,w = tmp[-2],tmp[-1],tmp[0],tmp[1]
        if x==y^z and y==z^w:
            ans="Yes"
            break
#
print( ans )


### FIXED CODE ###

#!/usr/bin/env python
 
import sys
 
n= int(sys.stdin.readline())
ai = [ int(x) for x in sys.stdin.readline().split() ]

a = list(set(ai))
na= len(a)
ans= "No"
if na==1 and a[0]==0: ans="Yes"
elif na==2 and 0 in a:
    x= a[0]
    if x==0: x= a[1]
    if ai.count(x)==2*ai.count(0): ans= "Yes"
elif na==3:
    x,y,z= a
    if x^y^z: pass
    else:
        n,l,m= [ ai.count(i) for i in a ]
        if n==l==m: ans="Yes"
#
print( ans )
while True:
 a,op,b = map(str,raw_input().split())
 a=int(a)
 b=int(b)

 if(op=='?'):
  break
 if(op=='+'):
  print s+b
 elif(op=='-'):
  print a-b
 elif(op=='*'):
  print a*b
 elif(op=='/'):
  print a/b

### FIXED CODE ###

while True:
 a,op,b = map(str,raw_input().split())
 a=int(a)
 b=int(b)

 if(op=='?'):
  break
 if(op=='+'):
  print a+b
 elif(op=='-'):
  print a-b
 elif(op=='*'):
  print a*b
 elif(op=='/'):
  print a/b
N, M = map(int, input().split())
S, C = [], []
for i in range(M):
    s, c = map(int, input().split())
    S.append(s)
    C.append(c)

for i in range(10**(N-1), 10**(N)):
    t = str(i)
    flag = True
    for j in range(M):
        if t[S[j]-1] != str(C[j]):
            flag = False
    if flag:
        print(i)
        F = True
        break
if not F:
    print(-1)

### FIXED CODE ###


N, M = map(int, input().split())
S, C = [], []
for i in range(M):
    s, c = map(int, input().split())
    S.append(s)
    C.append(c)
F = False
for i in range(10**(N)):
    t = str(i)
    flag = True
    if len(t) != N:
        continue
    for j in range(M):
        if t[S[j]-1] != str(C[j]):
            flag = False
    if flag:
        print(i)
        F = True
        break
if not F:
    print(-1)
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y = map(int, input().split())

if (y == 0):
  print(x)
  exit()

p = [list(map(int, input().split()))]
p_n = np.array(p)
p_n = p_n.reshape(-1)
pp = np.arange(1, 100)
for i in p_n:
    pp[i-1] += 10000
sa = min(abs(pp-x))
if pp[x-sa-1] >= 10000:
    print(x+sa)
else:
    print(x-sa)

### FIXED CODE ###

import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline
x, y = map(int, input().split())
if y == 0:
    print(x)
    exit()
p = [list(map(int, input().split()))]
p_n = np.array(p)
p_n = p_n.reshape(-1)
pp = np.arange(0, 102)
for i in p_n:
    pp[i] += 10000
sa = min(abs(pp-x))
if sa <= 101:
    if pp[x-sa] >= 10000:
        print(x+sa)
    else:
        print(x-sa)
else:
    print("0")
a, b, c = input().split(' ')
if a+b < c:
    return 'No'
else:
    return 'Yes'

### FIXED CODE ###

s = input()
a, b, c = [int(x) for x in s.split(' ')]
if a+b < c:
    print('No')
else:
    print('Yes')
a, b = map(int, raw_imput(), split())

if a < b:
 print "a < b" 

### FIXED CODE ###

a, b = map(int, raw_input().split())
 
if a < b:
 print "a < b"
elif a > b:
 print "a > b"
elif a == b:
 print "a == b"
a,b=input().split()
a = int(a)
b = float(b)
b = round(b * 100)
ans = (a*c) // 100
print(ans)

### FIXED CODE ###

a,b=input().split()
a = int(a)
b = float(b)
b = round(b * 100)
ans = (a*b) // 100
print(ans)
N=int(int(input())/2)
N-=(N+1)%2
a=sorted(input().split())
print(int(a[N+1])-int(a[N]))

### FIXED CODE ###

N=int(int(input())/2)
a=sorted(list(map(int,input().split())))
print(int(a[N])-int(a[N-1]))
import math
A, B = map(int, input().split())
print(A*B//math.gcd(A, B))

### FIXED CODE ###

import fractions
A, B = map(int, input().split())
print(A*B//fractions.gcd(A, B))
def main():
    height, width = map(int, input().split(" "))
    grids = ["." * (width + 2)]
    for _ in range(height):
        grids.append("." + input() + ".")
    grids.append("." * (width + 2))
    is_possible = True
    for i in range(1, width + 1):
        for j in range(1, height + 1):
            if grids[i][j] == "#":
                if not(grids[i + 1][j] == "#" or grids[i - 1][j] == "#" or grids[i][j + 1] == "#" or grids[i][j - 1] == "#"):
                    is_possible = False
    if is_possible:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    height, width = map(int, input().split(" "))
    grids = ["." * (width + 2)]
    for _ in range(height):
        grids.append("." + input() + ".")
    grids.append("." * (width + 2))
    is_possible = True
    for i in range(1, height + 1):
        for j in range(1, width + 1):
            if grids[i][j] == "#":
                if not (grids[i + 1][j] == "#" or grids[i - 1][j] == "#" or grids[i][j + 1] == "#" or grids[i][j - 1] == "#"):
                    is_possible = False
    if is_possible:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()