Harryxun/stf_run huggingface dataset:
# coding: utf-8
# Your code here!
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k
    print("Yay!")
else:
    print(":(")

### FIXED CODE ###

# coding: utf-8
# Your code here!
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
    print("Yay!")
else:
    print(":(")
A, B, C = map(int, input().split())
if A == B and B == C and C == A:
    print(Yes)
print(No)

### FIXED CODE ###

A, B, C = map(int, input().split())
if A == B and B == C and C == A:
    print("Yes")
elif A!=B or B!=C or C!=A:
    print("No")
import numpy as np

N,S,*A = map(int, open(0).read().split())
b = [x for x in A if x <= S]
coe = np.zeros(S+1,dtype='int64')
coe[0] = 2
coe[b[0]] = 1
for x in b[1:]:
    t1 = np.zeros(S+1,dtype='int64')
    t2 = np.zeros(S+1,dtype='int64')
    for i in range(S+1):
        if i + x <= S:
            t1[i] = (coe[i]*2) % 998244353
            t2[i+x] = coe[i]
        else:
            t1[i] = (coe[i]*2) % 998244353
    coe = t1 + t2
print(coe[S])

### FIXED CODE ###

N,S,*A = map(int, open(0).read().split())
dp = [[0] * (S+1) for _ in range(N+1)]
dp[0][0] = 1
appeared = set([0])
for i in range(1,N+1):
    temp = A[i-1]
    ts = set()
    for x in appeared:
        dp[i][x] += (dp[i-1][x]*2) % 998244353
        if temp + x <= S:
            dp[i][temp+x] += dp[i-1][x]
            if temp + x not in appeared:
                ts.add(temp+x)
    appeared |= ts
print(dp[N][S]%998244353)
s = input()

if s == s[::-1]:
    print(0)
    exit()

t = []

for i in range(len(s)):
    if s[i] != 'x':
        t.append(s[i])

if t != t[::-1]:
    print(-1)
    exit()

central_char = t[len(t)//2]

s = list(s)
s.insert(0, '*')
s.append('*')

central_position = 0

for i in range(len(s)):
    if s[i] == central_char:
        central_position = i

left = central_position - 1
right = central_position + 1
x_cnt = 0

while left > 0 or right < len(s)-1:
    if s[max(0, left)] == s[min(len(s), right)]:
        left -= 1
        right += 1
    else:
        x_cnt += 1
        if s[max(0, left)] == 'x':
            left -= 1
        else:
            right += 1

print(x_cnt)

### FIXED CODE ###

s = input()

left = 0
right = len(s) - 1
x_cnt = 0

while left < right:
    if s[left] == s[right]:
        left += 1
        right -= 1
    else:
        if s[left] == 'x':
            x_cnt += 1
            left += 1
        elif s[right] == 'x':
            x_cnt += 1
            right -= 1
        else:
            print(-1)
            exit()

print(x_cnt)
N = int(input())
A = list(map(int, input().split()))
s = 1
B = sort(A)
for i in B:
  s = s*i
	if s > 10**18:
    	s = -1
        break
    if s == 0
    	break
print(s)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
s = 1
B = sorted(A)
for i in B:
  s = s*i
  if s > 10**18:
    s = -1
    break
  if s == 0:
    break
print(s)
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
  c[i], t[i] = map(int, input().split())
 
costs = []
for i in range(N):
  if t[i] <= T:
    costs.append(c[i])
    
print(min(costs))

### FIXED CODE ###

N, T = map(int, input().split())
cost = 10000

for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    cost = min(cost, c)
    
if cost == 10000:
  print('TLE')
else:
  print(cost)
X = int(input())

if(x >= 30 ):
  print(Yes)
else:
  print(No)

### FIXED CODE ###

x = int(input())
 
if(x >= 30 ):
  print("Yes")
else:
  print("No")
r = input()
print(r*2*3.141)

### FIXED CODE ###

r = int(input())
print(r*2*3.141)
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

N = int(input())
L = [list(input()) for _ in range(N)]

a = []
for li in L:
    l = li.count('(')
    r = li.count(')')
    if l != r:
        a.append((l, r))
al = sorted(a, key=lambda x: x[0])
ar = sorted(a, key=lambda x: x[1])
ar.sort(reversed=True)

if al == ar:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

# import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial, gcd
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10 ** 7)
enu = enumerate
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep="\n")

N = int(input())
L = [input() for _ in range(N)]

up = []
do = []
for li in L:
    l = li.count("(")
    r = li.count(")")
    ext_neg = 0
    ext_pos = 0
    tl, tr = 0, 0
    if 0 <= l - r:
        for op in li:
            if op == "(":
                tl += 1
            elif op == ")":
                tr += 1
            ext_neg = min(ext_neg, tl - tr)
            ext_pos = max(ext_pos, tl - tr)
        up.append((l - r, ext_neg, ext_pos))
    else:
        for op in li[::-1]:
            if op == ")":
                tl += 1
            elif op == "(":
                tr += 1
            ext_neg = min(ext_neg, tl - tr)
            ext_pos = max(ext_pos, tl - r)
        do.append((r - l, ext_neg, ext_pos))
up.sort(key=lambda tup: (-tup[1], -tup[0]))
do.sort(key=lambda tup: (-tup[1], -tup[0]))
# print(up)
# print(do)

curl = 0
for upi in up:
    dif, ext_neg, ext_pos = upi
    if curl + ext_neg < 0:
        print("No")
        exit()
    curl += dif
curr = 0
for doi in do:
    dif, ext_neg, ext_pos = doi
    if curr + ext_neg < 0:
        print("No")
        exit()
    curr += dif
if curl == curr:
    print("Yes")
else:
    print("No")
a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if (aok - 1) * d - a => 0:
  print("NO")
else:
  print("Yes")


### FIXED CODE ###

a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if ((aok - 1) * d - a) >= 0:
  print("No")
else:
  print("Yes")
import numpy as np
N,K=map(int,input().split())
P=np.array(list(map(int,input().split())))

max_value=0
for i in range(N-K+1):
    if max_value < sum(P[i:i+K]):
        max_value = sum(P[i:i+K])
        max_i = i
max_vector = P[max_i:max_i+K]

sum_ex = 0
for i in range(K):
    sum_ex = sum_ex + sum(np.arange(max_vector[i]+1)) / max_vector[i]
print(sum_ex)

### FIXED CODE ###

S,T=input().split()
A,B=map(int,input().split())
U=input()
if U==S:
    A=A-1
else:
    B=B-1
print(A,B)
#!/usr/bin/env python3 ## -*- python -*-
import math

t = input().split()
a = int(t[0])
b = int(t[1])
c = int(t[2])

ans = "No"
if math.sqrt(a)+math.sqrt(b) < math.sqrt(c):
    ans = "Yes"
print(ans)

### FIXED CODE ###

#!/usr/bin/env python3 ## -*- python -*-
k = int(input())

a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(a[k-1])
S=input()
size=len(S)
def palin(S,size):
    for i  in range (size//2):
        if S[i]!=S[-1-i]:
            return False
    return True
if palin(S,size) == True:
    L=S[:size//2]
    R=S[size//2+2]
    if palin(L,size//2) & palin(L,size//2):
        print('Yes')
    else:
        print('No')
else:
    print('No')


### FIXED CODE ###

S=input()
size=len(S)
def palin(S,size):
    for i  in range (size//2):
        if S[i]!=S[-1-i]:
            return False
    return True
if palin(S,size) == True:
    L=S[:size//2]
    R=S[size//2+2:]
    if palin(L,size//2) & palin(L,size//2):
        print('Yes')
    else:
        print('No')
else:
    print('No')
def solve():
	a, b = map(int, raw_input().split())
	if a < b :
		return print "a < b"
	if a == b :
		return print "a == b"
	if a > b :
		return print "a > b"


if __name__ = "__main__"
	solve()

### FIXED CODE ###

def solve():
	a, b = map(int, raw_input().split())
	if a < b :
		print "a < b"
	elif a == b :
		print "a == b"
	else:
		print "a > b"


if __name__ == "__main__":
	solve()
def resolve():
    from fractions import gcd
    n = int(input())
    a = list(map(int, input().split()))
    mod = 10**9 + 7
    lsd = a[0]
    for i in range(1, n):
        lsd = int((lsd * a[i]) / (gcd(lsd, a[i])))

    ans = 0
    for i in range(n):
        ans += (lsd/a[i]) % mod

    print(int(ans % mod))

resolve()

### FIXED CODE ###

def resolve():
    def lcm(X, Y):
        x = X
        y = Y
        if y > x:
            x, y = y, x
        while x % y != 0:
            x, y = y, x % y
        return X * Y // y
    n = int(input())
    a = list(map(int, input().split()))
    mod = 10**9 + 7
    lsd = a[0]
    for i in range(1, n):
        lsd = lcm(lsd, a[i])
    lsd = lsd % mod

    ans = 0
    for i in range(n):
        ans += (lsd * pow(a[i], mod-2, mod)) % mod

    print(int(ans % mod))

resolve()
a,b,c,k=map(int,input().split())
print(min((a-max(k-a-b,0)),k)

### FIXED CODE ###

a,b,c,k=map(int,input().split())
print(min((a-max(k-a-b,0)),k))
a,b=map(int,input().split())
if a>2*b:
print(a-2*b)
else:
print(0)


### FIXED CODE ###

a,b = map(int,input().split())
c = 2*b
d = a-c
if d > 0:
 print(d)
elif d <= 0:
 print(0)
def solve(n,a):
    wa=0
    for i in range(n):
        if(i%2==0):
            wa+=a[i]
    kotae=wa
    for i in range(n//2):
        wa+=a[(n//2-i-1)*2+1]
        wa-=a[(n//2-i-1)*2]
        if(wa>kotae):
            kotae=wa
    return kotae

def dfs(n,a):
    if(n==3):
        return max(a)
    #kotae=solve(n-1,a[1:])+a[0]
    #kotae=max(kotae,solve(n-1,a[:n-1])+a[n-1])
    #kotae=max(kotae,dfs(n-2,a[1:n-1]))
    #print(kotae)
    kotae=dfs(n-2,a[2:])+a[0]
    kotae=max(kotae,dfs(n-2,a[:n-2])+a[n-1])
    temp=0
    for i in range(n//2):
        temp+=a[i*2+1]
    kotae=max(temp,kotae)
    return kotae

n=int(input())

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


if(n%2==0):
    print(solve(n,a))
else:
    print(dfs(n,a))

### FIXED CODE ###

import sys

sys.setrecursionlimit(10**6)

def solve(n,a):
    wa=0
    for i in range(n):
        if(i%2==0):
            wa+=a[i]
    kotae=wa
    for i in range(n//2):
        wa+=a[(n//2-i-1)*2+1]
        wa-=a[(n//2-i-1)*2]
        if(wa>kotae):
            kotae=wa
    return kotae

def dfs(n,a,k):
    global zen
    zen.append([n,k])
    if(k==1):
        return max(a)
    ari=a[n-1]+dfs(n-2,a[:n-2],k-1)
    if(n==k*2-1):
        return ari
    nasi=dfs(n-1,a[:n-1],k)
    return max(ari,nasi)

n=int(input())

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

if(n%2==0):
    print(solve(n,a))
else:
    data=[[a[0],a[0]],[max(a[:2]),max(a[:2])]]
    #data.append([max(a[:3]),sum(a[:3])-min(a[:3])])
    data.append([max(a[:3]),a[0]+a[2]])
    for i in range(3,n):
        if(i%2==1):
            ari=a[i]+data[i-2][0]
            nasi=data[i-1][1]
            saiyo=max(ari,nasi)
            data.append([saiyo,saiyo])
        else:
            ooi=a[i]+data[i-2][1]
            nasi=data[i-1][1]
            ari=a[i]+data[i-2][0]
            sukunai=max(ari,nasi)
            data.append([sukunai,ooi])
    print(data[n-1][0])
#!/usr/bin/env python
# coding: utf-8
#


def main(x):
    a = x[0]
    b = x[1]
    if a < b:
        print('a < b')
        return 
    elif a > b:
        print('a > b')
        return 
    else:
        print('a == b')
        return
    
    
if '__main__' == __name__:
    try:
        while True:
            main(list(map(int, input().strip())))
    except EOFError:
        pass



### FIXED CODE ###

def main(x):
    a = x[0]
    b = x[1]
    if a < b:
        print('a < b')
        return 
    elif a > b:
        print('a > b')
        return 
    else:
        print('a == b')
        return
    
    
if '__main__' == __name__:
    try:
        while True:
            main(list(map(int, input().strip().split(' '))))
    except EOFError:
        pass
N, Q = map(int, input().split())
S = list(input())
cnt = [0] * (N - 1)

last = ''
for i in range(N):
    c = S[i]
    if (last + c) == 'AC':
        cnt[i] = 1
    last = c

for _ in range(Q):
    l, r = map(int, input().split())
    ans = sum(cnt[l - 1:r - 1])
    print(ans)

### FIXED CODE ###

N, Q = map(int, input().split())
S = list(input())
cnt = [0] * (N)

for i in range(1, N):
    if S[i - 1] + S[i] == 'AC':
        cnt[i] = cnt[i - 1] + 1
    else:
        cnt[i] = cnt[i - 1]

for _ in range(Q):
    l, r = map(int, input().split())
    ans = cnt[r - 1] - cnt[l - 1]
    print(ans)
N = int(input())
Ls = map(int, input().split())

sum = 0

for i in range(N):
    sum += Ls[i]

if max(Ls)*2 < sum:
    print("Yes")
else:
    print("No")
    

### FIXED CODE ###

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

sum = 0

for i in range(N):
    sum += Ls[i]

if max(Ls)*2 < sum:
    print("Yes")
else:
    print("No")
def ramp(t):
    if t >= 0:
        return t
    else:
        return 0
def heav(t):
    if t >= 0:
        return(1)
    else:
        return(0)

N,W = map(int,input().strip().split(" "))
lst = []
for i in range(N):
    l = list(map(int,input().strip().split(" ")))
    lst.append(l)
table = [[0 for c in range(W+1)] for i in range(N+1)]
for i in range(1,N+1):
    for c in range(1,W+1):
        table[i][c] = max(table[i-1][c],table[i-1][sgn(c-lst[i-1][1])]+lst[i-1][0]*heav(c-lst[i-1][1]))
print(table[N][W])



### FIXED CODE ###

def ramp(t):
    if t >= 0:
        return t
    else:
        return 0
def heav(t):
    if t >= 0:
        return(1)
    else:
        return(0)
N,W = map(int,input().strip().split(" "))
lst = []
for i in range(N):
    l = list(map(int,input().strip().split(" ")))
    lst.append(l)
table = [[0 for c in range(W+1)] for i in range(N+1)]
for i in range(1,N+1):
    for c in range(1,W+1):
        table[i][c] = max(table[i-1][c],table[i-1][ramp(c-lst[i-1][1])]+lst[i-1][0]*heav(c-lst[i-1][1]))
print(table[N][W])
s = int,input()
i = list(int,input())

### FIXED CODE ###

s = int,input()
i = list(map(int,input().split()))
err = 0
total = 0
while err == 0:
    count = 0
    for nom in i:
        if nom % 2 == 1:
            err = 1
            count += 1
        else:
            i[count] = nom / 2
            count += 1
    if err == 0:
        total += 1
print(total)
import sys
 
 
def solve(A: int, B: int, C: int, K: int):
    if (K <= A):
        print(K)
    else:
        if (K <= (A+B)):
            print(A)
        else:
            print(A-(K-A-B))
    return
 
 
# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, C, K)
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str, T: str):
    if (S == T[:-1]):
        print(YES)
        return 0
    print(NO)
    return 1

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    solve(S, T)

if __name__ == '__main__':
    main()
#16D8101014F 久留米 竜之介 Python3
#a=[]
while(True):
	i=0
	tmp=0
	a=input().split('"') 
	aL=len(a)
	b=input().split('"')
	bL=len(b)
	if a[0]==".":
		break
		
	if aL != bL:
		print("DIFFELENT")
	else:
		while(True):
			if a[i] != b[i]:
				print("DIFFERENT")
				break
			elif i > aL-2:
				if tmp==1:
					print("CLOSE")
					break
				else:
					print("IDENTICAL")
					break
			elif a[i+1] != b[i+1]:
				if tmp==1:
					print("DIFFERENT")
					break
				else: tmp=1
			i +=2
	


### FIXED CODE ###

#16D8101014F 久留米 竜之介 Python3
#a=[]
while(True):
	i=0
	tmp=0
	a=input().split('"') 
	aL=len(a)
	if a[0] ==".":
		break
	b=input().split('"')
	bL=len(b)
		
	if aL != bL:
		print("DIFFERENT")
	else:
		while(True):
			if a[i] != b[i]:
				print("DIFFERENT")
				break
			elif i > aL-2:
				if tmp==1:
					print("CLOSE")
					break
				else:
					print("IDENTICAL")
					break
			elif a[i+1] != b[i+1]:
				if tmp==1:
					print("DIFFERENT")
					break
				else: tmp=1
			i +=2
n = int(input())
total = 0

for i in range(n):
  x_temp, u_temp = map(int, input())
  if u_temp = 'BTC':
    x_temp *= 380000.0
  total += x_temp
  
print(total)

### FIXED CODE ###

n = int(input())
total = 0

for i in range(n):
  x_temp, u_temp = input().split()
  x_temp = float(x_temp)
  if u_temp == 'BTC':
    x_temp *= 380000.0
  total += x_temp
  
print(total)
i = 1
while true:
 x = int(input())
 if x == 0:
  break
 print('case {0}: {1}'.format(i,x))
 i = i+1


### FIXED CODE ###

i = 1
while True:
 x = int(input())
 if x == 0:
  break
 print('Case %d: %d' % (i,x))
 i +=1
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    H, W = map(int, input().split())
    A = []
    cnt = 0
    for _ in range(H):
        a = list(map(int, input().split()))
        cnt += sum(a)
        A.append(a)

    ans = []
    for h in range(H):
        if h % 2 == 0:
            for w in range(W):
                if h == H - 1 and w == W - 1:
                    continue
                if A[h][w] % 2 == 1:
                    if w == W:
                        A[h][w] -= 1
                        A[h + 1][w] += 1
                        ans.append((h, w, h + 1, w))
                    else:
                        A[h][w] -= 1
                        A[h][w + 1] += 1
                        ans.append((h, w, h, w + 1))
                else:
                    continue
        else:
            for w in range(W)[::-1]:
                if h == H - 1 and w == 0:
                    continue
                if A[h][w] % 2 == 1:
                    if w == 0:
                        A[h][w] -= 1
                        A[h + 1][w] += 1
                        ans.append((h, w, h + 1, w))
                    else:
                        A[h][w] -= 1
                        A[h][w - 1] += 1
                        ans.append((h, w, h, w + 1))
                else:
                    continue

    print(len(ans))
    for a, b, c, d in ans:
        print(a + 1, b + 1, c + 1, d + 1)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    H, W = map(int, input().split())
    A = []
    cnt = 0
    for _ in range(H):
        a = list(map(int, input().split()))
        cnt += sum(a)
        A.append(a)

    ans = []
    for h in range(H):
        if h % 2 == 0:
            for w in range(W):
                if h == H - 1 and w == W - 1:
                    continue
                if A[h][w] % 2 == 1:
                    if w == W - 1:
                        A[h][w] -= 1
                        A[h + 1][w] += 1
                        ans.append((h, w, h + 1, w))
                    else:
                        A[h][w] -= 1
                        A[h][w + 1] += 1
                        ans.append((h, w, h, w + 1))
                else:
                    continue
        else:
            for w in range(W)[::-1]:
                if h == H - 1 and w == 0:
                    continue
                if A[h][w] % 2 == 1:
                    if w == 0:
                        A[h][w] -= 1
                        A[h + 1][w] += 1
                        ans.append((h, w, h + 1, w))
                    else:
                        A[h][w] -= 1
                        A[h][w - 1] += 1
                        ans.append((h, w, h, w - 1))
                else:
                    continue

    print(len(ans))
    for a, b, c, d in ans:
        print(a + 1, b + 1, c + 1, d + 1)


if __name__ == "__main__":
    main()
N, A, B = map(int, input().split())
loop = N // (A + B)
amari = N % (A + B)
blue = A * loop + min(A, amari)
print(blue)


### FIXED CODE ###

S = str(input())
if S[0] == S[1] == S[2]:
    print('No')
else:
    print('Yes')
s = input()
if len(s) %2 !=0:
  print("No")
else:
  c =0
  for i in range(len(s)//2):
    hi = s[2*i:2*i+2]
    if hi == "hi":
      pass
    else:
      c = 1:
      break
  if c ==0:
    print("Yes")
    
  else:
    print("No")

### FIXED CODE ###

s = input()
if len(s) %2 !=0:
  print("No")
else:
  c =0
  for i in range(len(s)//2):
    hi = s[2*i:2*i+2]
    if hi == "hi":
      pass
    else:
      c = 1
      break
  if c ==0:
    print("Yes")
    
  else:
    print("No")
N,M = map(int,input().split())
array = []
for i in range(M):
    a = list(map(int,input().split()))
    array.append(a)
maxa = max(array)
maxa = maxa[1]
array2 = [0 for i in range(maxa+2)]
for i in array:
    array2[i[0]] += 1
    array2[i[1]+1] -= 1
for i in range(len(array2)-1):
    array2[i+1] += array2[i]
print(array2.count(M))
    

### FIXED CODE ###

N,M = map(int,input().split())
array = []
for i in range(M):
    a = list(map(int,input().split()))
    array.append(a)
maxa = max([i[1] for i in array])
array2 = [0 for i in range(maxa+2)]
for i in array:
    array2[i[0]] += 1
    array2[i[1]+1] -= 1
for i in range(len(array2)-1):
    array2[i+1] += array2[i]
print(array2.count(M))
list = input().split(' ')

x = int(list[0]) * int(list[1])
y = (int(list[0]) + int(list[1])) * 2

print('{} {}').format(x,y)

### FIXED CODE ###

list = input().split(' ')

x = int(list[0])

y = int(list[1])

x1 = x * y
y1 = (x + y) * 2

print(str(x1) + ' ' + str(y1))
n, m, x = map(int, input().split())
prace = []
know = []
for i in range(n):
    acc = list(map(int, input().split()))
    prace.append(acc[0])
    know.append(acc[1:])

ans = 10**10
for i in range(2**n):
    und = [0 for i in range(m)]
    f = "{:b}".format(i)
    s = f.zfill(m)
    mm = 0
    for j in range(len(s)):
        if s[j] == '1':
            for k in range(m):
                und[k] += know[j][k]
            mm += prace[j]
    for j in range(m):
        if und[j] < x:
            break
    else:
        ans = min(ans, mm)
if ans == 10**10:
    print(-1)
else:
    print(ans)


### FIXED CODE ###

n, m, x = map(int, input().split())
prace = []
know = []
for i in range(n):
    acc = list(map(int, input().split()))
    prace.append(acc[0])
    know.append(acc[1:])

ans = 10**10
for i in range(2**n):
    und = [0 for i in range(m)]
    f = "{:b}".format(i)
    s = f.zfill(n)
    mm = 0
    for j in range(len(s)):
        if s[j] == '1':
            for k in range(m):
                und[k] += know[j][k]
            mm += prace[j]
    for j in range(m):
        if und[j] < x:
            break
    else:
        ans = min(ans, mm)
if ans == 10**10:
    print(-1)
else:
    print(ans)
h, w = map(int, input().split())
As = list(chain.from_iterable([list(input()) for i in range(h)]))
print("Possible" if As.count("#") == h + w - 1 else "Impossible")

### FIXED CODE ###

h, w = map(int, input().split())
As = [list(input()) for i in range(h)]

x,y = 0,0

ans = "Possible"

while True:
    cnt = 0
    tmpX,tmpY = x,y
    # 上か左が"#" -> error
    if (x > 0 and As[y][x-1] == "#") or (y > 0 and As[y-1][x] == "#"):
        ans = "Impossible"
        break
    
    # 右も下も"#" -> error
    if x < w - 1 and As[y][x+1] == "#" and y < h - 1 and As[y+1][x] == "#":
        ans = "Impossible"
        break
    
    # 右に移動
    if x < w - 1 and As[y][x+1] == "#":
        As[y][x] = "."
        x += 1
    # 左に移動
    if y < h - 1 and As[y+1][x] == "#":
        As[y][x] = "."
        y += 1
        
    # 右下に到着
    if x == w - 1 and y == h - 1:
        As[y][x] = "."
        break

    # 移動していない
    if x == tmpX and y == tmpY:
        ans = "Impossible"
        break
        
for A in As:
    if "#" in A:
        ans = "Impossible"

print(ans)