Harryxun/stf_run huggingface dataset:
i = list(map(int,input().split()))
a = i[0]+i[1]
b = i[0]+i[2]
c = i[1]+i[2]
d = list(a,b,c)
print(d.min())

### FIXED CODE ###

i = list(map(int,input().split()))
a = i[0]+i[1]
b = i[0]+i[2]
c = i[1]+i[2]
d = [a,b,c]
print(min(d))
N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(M)]
AB = AB[::-1]
res = (N*(N-1))//2
ans = []
for l in AB:
    l[0] -= 1
    l[1] -= 1
parent = [-1]*N  # 親の番号を格納 -(size)の場合は親


def root(node):
    if parent[node] < 0:
        return node
    else:
        parent[node] = root(parent[node])
        return parent[node]


def size(node):
    return -parent[root(node)]


def connect(a, b):
    a = root(a)
    b = root(b)
    if a == b:
        return False
    parent[a] += parent[b]
    parent[b] = a
    return True


for A, B in AB:
    ans.append(res)
    a = size(A)
    b = size(B)
    if connect(A, B):
        res -= a*b

for i in ans[::-1]:
    print(i)


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000) 

N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(M)]
AB = AB[::-1]
res = (N*(N-1))//2
ans = []
for l in AB:
    l[0] -= 1
    l[1] -= 1
parent = [-1]*N


def root(node):
    if parent[node] < 0:
        return node
    else:
        parent[node] = root(parent[node])
        return parent[node]


def size(node):
    return -parent[root(node)]


def connect(a, b):
    a = root(a)
    b = root(b)
    if a == b:
        return False
    parent[a] += parent[b]
    parent[b] = a
    return True


for A, B in AB:
    ans.append(res)
    a = size(A)
    b = size(B)
    if connect(A, B):
        res -= a*b

for i in ans[::-1]:
    print(i)
N,A,B=map(int, input().split())

s=N//(A+B)
NA=N%(A+B)
if(A!=0):
  if(NA<A):
    sA=0
    sAG=NA
  else:
    sA=1
    sAG=0
else:
  sA=0
  sAG=0
print(s*A+sA*A+sAG)

### FIXED CODE ###

S=input()
Sset=set(S)
if(len(Sset)==2):
  print('Yes')
else:
  print('No')
def f(x):
    if x == "r":
        return "p"
    elif x == "s":
        return "r"
    else:
        return "s"

def g(x):
    if x == "r":
        return r
    elif x == "s":
        return s
    else:
        return p 

n,k = map(int,input().split())
 
r,s,p = map(int,input().split())
 
t = str(input())
ssssppr
m = n
a = 0
ss = [' '] ** m
 
if m <= k:
    for i in range(m):
        a += g(f(t[i]))
    print(a)
else:
    for i in range(k):
        a += g(f(t[i]))
        ss[i] = f(t[i])
    for i in range(k,m):
        if t[i-k] != t[i]:
            a += g(f(t[i]))
            ss[i] = f(t[i])
        elif (t[i-k] == t[i]) and (ss[i-k] != f(t[i])):
            a += g(f(t[i]))
            ss[i] = f(t[i])
    print(a)
    

### FIXED CODE ###

def f(x):
    if x == "r":
        return "p"
    elif x == "s":
        return "r"
    else:
        return "s"

def g(x):
    if x == "r":
        return r
    elif x == "s":
        return s
    else:
        return p 

n,k = map(int,input().split())

r,s,p = map(int,input().split())

t = str(input())

m = n
a = 0
ss = [' '] * m

if m <= k:
    for i in range(m):
        a += g(f(t[i]))
    print(a)
else:
    for i in range(k):
        a += g(f(t[i]))
        ss[i] = f(t[i])
    for i in range(k,m):
        if t[i-k] != t[i]:
            a += g(f(t[i]))
            ss[i] = f(t[i])
        elif (t[i-k] == t[i]) and (ss[i-k] != f(t[i])):
            a += g(f(t[i]))
            ss[i] = f(t[i])
    print(a)
from sys import setrecursionlimit
setrecursionlimit(10 ** 5 + 10)

N, M, *XY = map(int, open(0).read().split())

E = [[] for _ in range(N + 1)]
for x, y in zip(*[iter(XY)] * 2):
    E[x].append(y)

memo = {}
def dp(p):
    return memo.get(p, max((1 + dp(c) for c in E[p]), default=0))

print(max(dp(p) for p in range(1, N + 1)))

### FIXED CODE ###

from sys import setrecursionlimit
setrecursionlimit(10 ** 5 + 10)

N, M, *XY = map(int, open(0).read().split())

E = [[] for _ in range(N + 1)]
for x, y in zip(*[iter(XY)] * 2):
    E[x].append(y)

memo = {}
def dp(p):
    if p in memo:
        return memo[p]

    memo[p] = max((1 + dp(c) for c in E[p]), default=0)
    return memo[p]

print(max(dp(p) for p in range(1, N + 1)))
primes = []
MAX_NUM = 100000
is_prime = [True] * MAX_NUM
is_prime[0] = False
is_prime[1] = False
for num in range(MAX_NUM):
    if is_prime[num]:
        primes.append(num)
        for j in range(2*num, MAX_NUM, num):
            is_prime[j] = False

def do_prime_factorization(x):
    ps = []
    i = 0
    n = len(primes)
    while (x > 1) and (i < n):
        p = primes[i]
        while x % p == 0:
            x /= p
            ps.append(p)
        i += 1
    if x > 1:
        ps.append(p)
    res = {}
    for p in ps:
        if not p in res:
            res[p] = 0
        res[p] += 1
    return res

def f(x, d, n, m, ps):
    if x >= n:
        return x
    if d >= len(ps):
        return m
    p, num = ps.items()[d]
    res = m
    for i in range(num+1):
        y = x * (p**i)
        res = min(res, f(y, d+1, n, m, ps))
    return res

def solve(n, m):
    ps = do_prime_factorization(m)
    q = f(1, 0, n, m, ps)
    assert m % q == 0, (m, q)
    p = m // q
    return p

n, m = map(int, raw_input().split())
print(solve(n, m))

### FIXED CODE ###

primes = []
MAX_NUM = 100000
is_prime = [True] * MAX_NUM
is_prime[0] = False
is_prime[1] = False
for num in range(MAX_NUM):
    if is_prime[num]:
        primes.append(num)
        for j in range(2*num, MAX_NUM, num):
            is_prime[j] = False

def do_prime_factorization(x):
    res = {}
    for p in primes:
        if x == 1:
            break
        while x % p == 0:
            x /= p
            if not p in res:
                res[p] = 0
            res[p] += 1
    if x > 1:
        res[x] = 1
    return res.items()

def f(x, d, n, m, ps):
    if x >= n:
        return x
    if d < 0:
        return m
    p, num = ps[d]
    res = m
    for i in range(num+1):
        y = x * (p**i)
        res = min(res, f(y, d-1, n, m, ps))
    return res

def solve(n, m):
    ps = do_prime_factorization(m)
    q = f(1, len(ps)-1, n, m, ps)
    p = m // q
    return p

n, m = map(int, raw_input().split())
print(solve(n, m))
S = input()
K = int(input())
INF = 5 * 10 ** 16

if S[0] == "1":
    if K <= int(S[1]) * 5 * 10 ** 16 + 1:
        print(S[1])
    else:
        print(S[2])
else:
    if K <= int(S[0]) * 5 * 10 ** 16 + 1:
        print(S[0])
    else:
        print(S[1])

### FIXED CODE ###

S = input()
K = int(input())

ans = "1"
for i in range(K):
    if S[i] != "1":
        ans = S[i]
        break

print(ans)
N X=map(int ,raw_input().split())
L =list(map(int ,raw_input().split()))
p = 0
y = -1
for i in range(N):
    p += L[i]
    if p>X:
        y = i
        break
if y>=0:
    print y
else:
    print X

### FIXED CODE ###

N,X=map(int ,raw_input().split())
L =list(map(int ,raw_input().split()))
p = 0
y = -1
for i in range(N):
    p += L[i]
    if p>X:
        y = i
        break
if y>=0:
    print y+1
else:
    print N+1
def comb(n, r):
  if r == 0  or n == k: return 1
  else: return comb(n-1, r) + comb(n-1, r-1)
 
k, s = map(int, input().split())
print(comb(s-3k+2, 2))

### FIXED CODE ###

ans = 0
k, s = map(int, input().split())
for x in range(k+1):
  for y in range(k+1):
    z = s - x - y
    if 0 <= z and z <= k:
      ans += 1
 
 
 
print(ans)
import math
from itertools import accumulate

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

fromleft = list(accumulate(a, math.gcd))
fromright = list(accumulate(a[::-1], math.gcd)).reverse()

gcd = []

gcd.append(fromright[1])
for i in range(1, n-1):
    gcd.append(math.gcd(fromleft[i-1], fromright[i+1]))
gcd.append(fromleft[n-2])

print(max(gcd))


### FIXED CODE ###

import math
from itertools import accumulate

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

fromleft = list(accumulate(a, math.gcd))
a.reverse()
fromright = list(accumulate(a, math.gcd))
fromright.reverse()
a.reverse()

gcd = []

gcd.append(fromright[1])
for i in range(1, n-1):
    gcd.append(math.gcd(fromleft[i-1], fromright[i+1]))

gcd.append(fromleft[n-2])

if n == 2:
    print(max(a[1], a[0]))
else:
    print(max(gcd))
b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
eif b == "G":
    print("C")
else:
    print("G")

### FIXED CODE ###

b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "G":
    print("C")
else:
    print("G")
import sys
sys.setrecursionlimit(10010)
n,m,k=map(int,input().split())

L=[[] for i in range(1+n)]
Ncnt=[0 for i in range(1+n)]
C=[0 for i in range(1+n)]

for inp in range(m):
    a,b=map(int,input().split())
    L[a].append(b)
    L[b].append(a)



def tansa(x,gone,color):
    C[x]=color
    for nex in L[x]:
        if nex in gone:
            continue
        else:
            tansa(nex,gone+(nex,),color)

now=1
for i in range(1,n):
    if C[i]==0:
        tansa(i,(i,),now)
        now+=1

CC=sorted(C)

cnt=0
ccres=[]
for i in range(now):
    ccres.append(CC.index(i))
ccres.append(n+1)
dic={i:ccres[i+1]-ccres[i] for i in range(1,now)}

#print(C)
#print(dic)



for i in range(1,n):
    print(dic[C[i]]-len(L[i])-Ncnt[i]-1,end=" ")
i=n
print(dic[C[i]]-len(L[i])-Ncnt[i]-1,end="")


### FIXED CODE ###

n,m,k=map(int,input().split())
BAD=[0 for i in range(n+1)]

E=[]
for inp in range(m):
    a,b=map(int,input().split())
    E.append((a,b))
    BAD[a]-=1
    BAD[b]-=1

B=[] 
for inp in range(k):
    a,b=map(int,input().split())
    B.append((a,b))
    
uf=[i for i in range(n+1)]
def uf_find(x,uf=uf):
    while uf[x]!=x:
        x=uf[x]
    return x       


res=[]

for ele in E:
    if uf_find(ele[0]) == uf_find(ele[1]):
        continue
    else:
        res.append((ele[0],ele[1])) #write result
        
        if uf_find(ele[0])>uf_find(ele[1]):
            uf[uf_find(ele[0])]=uf_find(ele[1])
        else:
            uf[uf_find(ele[1])]=uf_find(ele[0])

SCO=[0 for i in range(n+1)]
for i in range(1,n+1):
    SCO[uf_find(i)]+=1


for bl in B:
    if uf_find(bl[0])==uf_find(bl[1]):
        BAD[bl[0]]-=1
        BAD[bl[1]]-=1

ANS=[str(SCO[uf_find(i)] + BAD[i] -1) for i in range(1,n+1)]
print(" ".join(ANS))
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))

K = len(bin(np.max(A))) - 2

ans = 0
mod = 10 ** 9 + 7
N %= mod

for i in range(K):
    bit = sum(A >> i & 1) % mod
    ans += pow(2, i, mod) * bit * (N - bit)
    ans %= mod
    
print(ans)

### FIXED CODE ###

import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))

K = len(bin(np.max(A))) - 2

ans = 0
mod = 10 ** 9 + 7
N %= mod

for i in range(K):
    bit = np.count_nonzero(A >> i & 1) % mod
    ans += 2 ** i * bit * (N - bit)
    ans %= mod
    
print(ans)
N,X=map(int,input().split())
L=sorted(map(int,input().split()),reverse=True)
mod=10**9+7

from collections import defaultdict
D=dict()
D[1,L[0]]=1

for l in L[1:]:
    ND=defaultdict(int)

    for c,s in D:
        k=D[c,s]

        if s+l<=X:
            ND[c+1,s+l]=(ND[c+1,s+l]+k*(c+1))%mod
        ND[c,s]=(ND[c,s]+k*(s-c*(l-1)))%mod

        for i in range(1,min(X-s+1,l+1)):
            ND[c,s+i]=(ND[c,s+i]+k*2*c)%mod

        for i in range(1,min(X-s+1,l+1)):
            ND[c-1,s+i]=(ND[c-1,s+i]+k*(c-1)*(l-i+1))%mod
    D=ND

print(D[1,X])

### FIXED CODE ###

N,X=map(int,input().split())
L=sorted(map(int,input().split()),reverse=True)
mod=10**9+7

D=[[0]*(X+1) for i in range(N//2+2)]
D[1][L[0]]=1

for l in L[1:]:
    ND=[[0]*(X+1) for i in range(N//2+1)]

    for c in range(1,N//2+1):
        for s in range(X+1):
            if D[c][s]==0:
                continue
            
            k=D[c][s]

            if s+l+c<=X and c+1<=N//2:
                ND[c+1][s+l]=(ND[c+1][s+l]+k*(c+1))%mod
            ND[c][s]=(ND[c][s]+k*(s-c*(l-1)))%mod

            for i in range(1,min(X-s-c+2,l+1)):
                ND[c][s+i]=(ND[c][s+i]+k*2*c)%mod

            if c==1:
                continue

            for i in range(1,min(X-s-c+3,l+1)):
                ND[c-1][s+i]=(ND[c-1][s+i]+k*(c-1)*(l-i+1))%mod
    D=ND

print(D[1][X])
# エラトステネスの篩
def make_prime_table(N):
    sieve = list(range(N + 1))
    sieve[0] = -1
    sieve[1] = -1
    sieve[2] = 2
    for i in range(3, int(N ** 0.5) + 1, 2):
        if sieve[i] != 0:
            continue
        sieve[i] = i
        for j in range(i * i, N + 1, i):
            if sieve[j] == 0:
                sieve[j] = i
    return sieve


def f(X):
    t = []
    a = X
    while a != 1:
        if len(t) != 0 and t[-1][0] == prime_table[a]:
            t[-1][1] += 1
        else:
            t.append([prime_table[a], 1])
        a //= prime_table[a]
    result = 1
    for _, n in t:
        result *= n + 1
    return result


N = int(input())

prime_table = make_prime_table(N)
result = 0
for K in range(1, N + 1):
    result += K * f(K)
print(result)


### FIXED CODE ###

# エラトステネスの篩
N = int(input())

sieve = [0] * (N + 1)
sieve[0] = -1
sieve[1] = -1
for i in range(2, N + 1):
    if sieve[i] != 0:
        continue
    sieve[i] = i
    for j in range(i * i, N + 1, i):
        if sieve[j] == 0:
            sieve[j] = i


def f(K):
    t = []
    a = K
    while a != 1:
        if len(t) != 0 and t[-1][0] == sieve[a]:
            t[-1][1] += 1
        else:
            t.append([sieve[a], 1])
        a //= sieve[a]
    result = 1
    for _, n in t:
        result *= (n + 1)
    return result


result = 0
for K in range(1, N + 1):
    result += K * f(K)
print(result)
n = int(input())
s = input()
#white
i=0
numw=0
while s[i]==".":
    numw+=1
    i+=1
    if i == n:
        break
#  ..##.#..
w = s.count(".")
answ = w-numw

#black
j=-1
numb=0
while s[j]=="#":
    numb+=1
    j-=1
    if j*(-1) == n:
        break
b = s.count('#')
ansb=b-numb

#b&w
bw=0
k=numw
if k!=0:
    while s[k]=="#":
        k+=1
        bw+=1
        if k==n:
            break
wb=0
l=numb*(-1)-1
if l!=-1:
    while s[l]==".":
        l-=1
        wb+=1
        if l==n*(-1):
            break
ans3=bw+wb
print(min(ansb,answ,ans3))


### FIXED CODE ###

n = int(input())
s = input()

a = []
#  .##..#.##.
w = s.count(".")
b = s.count("#")
m = min(w,b)

bb=0

for i in range(n):
    if s[i]=='.':
        w-=1
        a.append(bb+w)
    if s[i]=='#':
        bb += 1
        a.append(bb+w)
if len(a)>0:
    I = min(a)
    print(min(m,I))
else:
    print(m)
from sympy import sieve
 
def Eratosthenes(n):
    li = [i for i in range(2,n+1)]
    judge = [True for i in range(n+1)]
    ans = []
 
    for i in range(2,n+1):
        if judge[i] == True:
            for j in range(i*2,n+1,i):
                judge[j] = False
            ans.append(i)
    return ans
 
x = int(input())
l = Eratosthenes(10 ** 6)
for i in l:
    if i >= x:
        print(i)
        exit()

### FIXED CODE ###

def Eratosthenes(n):
    li = [i for i in range(2,n+1)]
    judge = [True for i in range(n+1)]
    ans = []
 
    for i in range(2,n+1):
        if judge[i] == True:
            for j in range(i*2,n+1,i):
                judge[j] = False
            ans.append(i)
    return ans
 
x = int(input())
l = Eratosthenes(10 ** 6)
for i in l:
    if i >= x:
        print(i)
        exit()
l=input()
ls=l.split(" ")
X=int(ls[0])
N=int(ls[1])
lstr=input()
lst=lstr.split(" ")
fl=[];
for a in lst:
    fl.append(int(a))
for a in range(len(fl)):
    if(X-a not in fl):
         print(X-a)
         break
    if(X+a not in fl):
         print(X+a)
         break


### FIXED CODE ###

l=input()
ls=l.split(" ")
X=int(ls[0])
N=int(ls[1])
lstr=input()
lst=lstr.split(" ")
fl=[]
if(N!=0):
    for a in lst:
         fl.append(int(a))
for a in range(101):
    if(X-a not in fl):
         print(X-a)
         break
    if(X+a not in fl):
         print(X+a)
         break
n,a,b=map(int,input().split())

count="b"*a
count+="r"*b

if len(count)==n:
  print(count.count("b"))
elif a==0:
  print(0)
else:
  n-=len(count)
  if n<=a:
    count+="b"*n
    print(count.count("b"))
  else:
    while n>0:
      if n==a+b:
        count+="b"*a
        count+="r"*b
        print(count.count("b"))
      elif n<=a+b:
        count+="b"*n
        print(count.count("b"))
      else:
        count+="b"*a
        count+="r"*b
        n-=a+b

### FIXED CODE ###

n,a,b=map(int,input().split())

ab=a+b
num=n//ab
n-=ab*num

if n>=a:
  ans=a
  
else:
  ans=n
  
print(ans+num*a)
import sys
lines = sys.stdin.readlines()

N, X = lines.strip("\n")
X = X.strip(" ")

res = float('inf')
for i in Range(1, 101):
  cur_res = 0
  for j in X:
    cur_res = cur_res + (j-i)^2
  if cur_res < res:
    res = cur_res

print(cur_res)

### FIXED CODE ###

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

res=0
for i in Xs:
    res = res + (i-round(sum(Xs)/N))**2

print(res)
import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    N,K=map(int, input().split())
    A=list(map(int, input().split()))

    d=1
    # for i in range(K):
    #     # print(d)
    #     d=A[d-1]
    # li=[1]
    li=[False]*N
    li[0]=True

    while True:
        d=A[d-1]
        if li[d-1]:
            break
        # li.append(d)
        li[d-1]=True

    d_p=A.index(d)
    # print(d_p)
    roop=d-1-d_p
    # print(K-d_p)
    # print(len(li))
    # if len(li)>K:
    #     # print(K-1)
    #     print(li[K-1])
    # else:
    # print((K-d_p)%roop)
    print(A[(K-d_p)%roop+d_p])

    # print(d)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    N,K=map(int, input().split())
    A=list(map(int, input().split()))

    d=1
    keys=list(range(N))
    li={s:-1 for s in keys}
    li[0]=0

    roop=0
    pre_d=0
    for i in range(1,K+1):
        pre_d=d
        d=A[d-1]
        # print("i:"+str(i)+" "+str(pre_d)+"->"+str(d))
        if li[d-1]!=-1:
            roop=i-li[d-1]
            # print("detect_roop:"+str(i)+"~"+str(li[d-1]))
            break
        else:
            li[d-1]=i

    if roop!=0:
        k=1
        for j in range((K-li[d-1]-1)%roop+li[d-1]+1):
            k=A[k-1]
        print(k)
    else:
        print(d)


if __name__ == '__main__':
    main()
N = int(input())
ans = 0
for i in range(1,N+1):
    last = N//j
    ans += ((1+last)*last//2)*i
print(ans)

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1,N+1):
    last = N//i
    ans += ((1+last)*last//2)*i
print(ans)
def gcd(a,b):
  while b:a,b=b,a%b
  return a
n,a,b=int(input()),list(map(int,input().split())),[]
if n==2:print(gcd(a[0],a[1]))
elif n==3:print(max(gcd(a[0],a[1]),gcd(a[0],a[2]),gcd(a[1],a[2])))
else:
  for i in range(n-1):b.append(gcd(a[i],a[i+1]))
  b.append(gcd(a[0],a[-1]))
  print(max(no,on),sorted(b)[2])

### FIXED CODE ###

def gcd(a,b):
  while b:a,b=b,a%b
  return a
n,a,b=int(input()),list(map(int,input().split())),[]
if n==2:print(max(a[0],a[1]))
elif n==3:print(max(gcd(a[0],a[1]),gcd(a[0],a[2]),gcd(a[1],a[2])))
else:
  no,mi=a[0],a[0]
  for i in range(1,n):
    s=gcd(no,a[i])
    if s!=no:
      no=max(s,mi)
      mi=gcd(s,mi)
  print(no)
import math

def gcd(x, y):
  if y == 0:
    return x
  else:
    return gcd(y, x % y)
      

n, x = map(int,input().split())
li_x = list(map(int,input().split()))

for i in range(len(li_x)):
    if li_x[i] - x < 0:
        li_x[i] =x - li_x[i]
    else:
        li_x[i] = li_x[i] -x

g =gcd(li_x[0],li_x[1])
k=2
while k<len(li_x):
  g=gcd(g,li_x[k])
  k+=1
print(g)


### FIXED CODE ###

import math

def gcd(x, y):
  if y == 0:
    return x
  else:
    return gcd(y, x % y)

n, x = map(int,input().split())
li_x = list(map(int,input().split()))

for i in range(len(li_x)):
  if li_x[i] - x < 0:
    li_x[i] =x - li_x[i]
  else:
    li_x[i] = li_x[i] -x

if len(li_x)==1:
  print(li_x[0])

elif len(li_x)==2:
  print(gcd(li_x[0],li_x[1]))

else:
  g =gcd(li_x[0],li_x[1])
  k=2
  while k<len(li_x):
    g=gcd(g,li_x[k])
    k+=1
  print(g)
h, w = map(int, input().split())
s = [['.']*(w+2)] + [['.']+list(input())+['.'] for _ in range(w)] + [['.']*(w+2)]
for i in range(1, w+1):
    for j in range(1, w+1):
        if s[i][j] == '#':
           if s[i-1][j] == '.' and s[i][j-1] == '.' and s[i][j+1] == '.' and s[i+1][j] == '.':
                print('No')
                exit()
print('Yes')

### FIXED CODE ###

H, W = map(int, input().split())
s = [list(input()) for _ in range(H)]
 
flag = False
for i in range(H):
    for j in range(W):
        if s[i][j] == '#':
            if (j-1 >= 0 and s[i][j-1] == '.') and (j+1 < W and s[i][j+1] == '.') and (i-1 >= 0 and s[i-1][j] == '.') and (i+1 < H and s[i+1][j] == '.'):
                print('No')
                flag = True
                break
    if flag:
        break
else:
    print('Yes')
import math

n = int(input())
a = [int(x) for x in input().split(" ")]

g = a[0]
for i in range(1, n):
    g = math.gcd(g, a[i])
    
    
print(g)

### FIXED CODE ###

def gcd(a, b):
    while b != a:
        if a < b:
            b = b % a
            if b == 0:
                return a
        elif b < a:
            a = a % b
            if a == 0:
                return b
    return a

def m(a):
    a.sort()
    l = len(a)
    b = []
    for i in range(l // 2):
        b.append(gcd(a[i], a[l - i - 1]))
    if l % 2 == 1:
        b.append(a[l // 2])
    return list(set(b))

    
n = int(input())
a = [int(x) for x in input().split(" ")]

while len(a) > 1:
    a = m(a)

print(a[0])
n=int(input())
h=list(map(int,input().split()))
dp=[float('inf')]*n
dp[0]=0

def rec(i):
    if dp[i]<float('inf'):
        return dp[i]
    
    if i==0:
        return 0
    
    res=float('inf')#最小に更新する
    
    res=ch_min(res,rec(i-1)+abs(h[i]-h[i-1]))
    if i>1:
        #i-2が負になる場合を避ける
        res=ch_min(res,rec(i-2)+abs(h[i]-h[i-2]))
    
    return res
    
    
print(rec(n-1))

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))

dp=[float('inf')]*n
dp[0]=0#初期条件を設定

for i in range(1,n):
    dp[i]=min(dp[i],dp[i-1]+abs(h[i]-h[i-1]))
    #i=1の時i-2<0となるので先にここを計算する
    if i>=2:
        dp[i]=min(dp[i],dp[i-2]+abs(h[i]-h[i-2]))
        
print(dp[-1])
A,B=map(input().split)
if A<B:
  print("<")
elif A>B:
  print(">")
else:
  print("=")

### FIXED CODE ###

A,B=input().split()
if A < B:
  print("<")
elif A > B:
  print(">")
else:
  print("=")
n = int(input())
ans = 0
btcjpy = 380000
for i in range(n):
  x, u = input().split()
  if u == 'BTC':
    ans += btcjpy * int(x)
  else:
    ans += int(x)
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
btcjpy = 380000
for i in range(n):
  x, u = input().split()
  if u == 'BTC':
    ans += btcjpy * float(x)
  else:
    ans += float(x)
print(ans)
import math

A,B,K=map(int,input().split())
gcd=math.gcd(A,B)
l=[]
for i in range(1,gcd):
    if gcd%i==0:
        l.append(i)

print(l[K-1])

### FIXED CODE ###

import fractions

A,B,K=map(int,input().split())
gcd=fractions.gcd(A,B)
#print(gcd)
l=[]
for i in range(1,gcd+1):
    if gcd%i==0:
        l.append(i)
#print(l)
print(l[len(l)-K])
r = input()
return 3*(r**2)

### FIXED CODE ###

r = int(input())
print(3*(r**2))
import math

def readInt():
	return int(input())

def readInts():
	return list(map(int, input().split()))

def readChars():
	return input().split()

s = input()

ai = [0]*len(s)
si = [0]*len(s)

p = 2019

for i in range(len(s)):
	ai[i] = (int(s[-1*i-1])

### FIXED CODE ###

import math

def readInt():
	return int(input())

def readInts():
	return list(map(int, input().split()))

def readChars():
	return input().split()

s = reversed(input())

ai = 0
si = 0

p = 2019
countarr = [0]*2019

for i, j in enumerate(s):
	ai = (int(j)*pow(10,i,p))%p
	si = (si+ai)%p
	countarr[si]+=1

res = countarr[0]
for i in range(p):
	c = countarr[i]
	res += c*(c-1)//2

print(res)
a = input() 
b = input()
if (a % 3) * (b % 3) * ((a + b) % 3) == 0:
    print "Possible"
else:
    print "Impossible"

### FIXED CODE ###

a, b = map(int, raw_input().split())
if any([x % 3 == 0 for x in [a, b, a+b]]):
    print "Possible"
else:
    print "Impossible"