peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n,m,x,y = map(int, input().split())
a = list(map(int, input().split())) + [x]
b = list(map(int, input().split())) + [y]
print ("No War" if max(a) < min(b) else "War")
# Judge status: Wrong Answer
import sys
from collections import deque
import bisect
import copy
import heapq
import itertools
import math
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


def main():
    N = int(input())
    A = read_list()
    pre = A[0]
    res = 0
    for a in A:
        res += max(0, a - pre)
        pre = a
    print(res)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
import math
N=int(input())
x=math.ceil(N/1.08)
X=math.floor((N+1)/1.08)
if x <= X:
  print(X)
else:
  print(":(")
# Judge status: Wrong Answer
from collections import deque
N, M = map(int,input().split())
graph = [[] for i in range(N + 1)]
dist = [-1] * (N + 1)
for _ in range(M):
    a,b = map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)

dist[1] = 1
q = deque([1])
while q:
    x = q.popleft()
    for j in graph[x]:
        if dist[j] == -1:
            q.append(j)
            dist[j] = x
ans = dist[2:]
print(*ans, sep = "\n")
# Judge status: Wrong Answer
n,q = map(int, input().split())
s = input()
af = False
AClist = [0 for i in range(10**5)]
for i,c in enumerate(s):
    if af:
        if c == 'C':
            AClist[i-1]+=1
        elif c != 'A':
            af = False
    else:
        if c == 'A':
            af = True

a2=[0]
for i in AClist:a2.append(a2[-1]+i)
def SumArea(l, r):
    return a2[r]-a2[l]


for i in range(q):
    l,r = map(int, input().split())
    print(SumArea(l-1, r-1))
# Judge status: Accepted
N = int(input())
MAX_list = []
ans = 0
A = -10**9-2

for _ in range(N):
    X, L = map(int, input().split())
    MAX_list.append(((X + L), (X - L)))
MAX_list = sorted(MAX_list)

for m, l in MAX_list:
    if l >= A:
        ans += 1
        A = m

print(ans)
# Judge status: Accepted
N, M = map(int,input().split()) 
p = [0]*M
S = [0]*M
T = [0]*(N+1) 
U = [0,0]
for i in range(M):
  p[i],S[i] = input().split()
  P = int(p[i])
  if T[P] != -1:
    if S[i] == 'WA':
      T[P] += 1
    elif S[i] == 'AC':
      U[0] += 1
      U[1] += T[P]
      T[P] = -1


print(U[0],U[1])
# Judge status: Accepted
s = [input() for i in range(3)]

s = {'a': s[0]+'@', 'b': s[1]+'@', 'c': s[2]+'@'}
l = {'a': len(s['a'])-1, 'b': len(s['b'])-1, 'c': len(s['c'])-1}
if len(s['a'])==1:
    print('A')
    exit()

ini = s['a'][0]
while True:
    l[ini] += -1
    tem_s=s[ini][0]
    s[ini] = s[ini][1:]
    if tem_s=='@':
        print(ini.upper())
        exit()
    ini =tem_s
# Judge status: Accepted
n, c, k=map(int,input().split())
bus=1
pssgr=0
fst_pssgr=0
t_lst=[]
for i in range(n):
    t=int(input())
    t_lst.append(t)

t_lst.sort()

for i in range(n):
    if t_lst[i]-t_lst[fst_pssgr]>k:
        bus+=1
        pssgr=1
        fst_pssgr=i
        continue
    pssgr+=1
    if pssgr==c and i<n-1:
        bus+=1
        pssgr=0
        fst_pssgr=i+1

print(bus)
# Judge status: Wrong Answer
i = list(map(int, input().split()))
K = int(input())
red=i[0]
red_double=i[0]*2
green=i[1]
green_double=i[1]*2
blue=i[2]
blue_double=i[2]*2
success=0

for num in range(K):
  if green < red:
    green = green_double
    green_double = green_double*2
  elif blue < green:
    blue = blue_double
    blue_double = blue_double*2
    
if (blue > green and  green > red):
  success=1

if success == 1:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
from math import gcd

N=int(input())
A = [0] + list(map(int, input().split()))
L = [0]*(N+2)
R = [0]*(N+2)
ans = 0
L[0] = 0
R[N+1] = 0
for i in range(1, N+1):
    L[i+1] = gcd(L[i], A[i])
for i in range(N, 0, -1):
    R[i] = gcd(R[i+1], A[i])
for i in range(N+1):
    ans = max(ans, gcd(L[i], R[i+1]))
print(ans)
# Judge status: Accepted
# 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())
A = list(map(int, input().split()))

d = defaultdict(int)
for a in A:
    d[a] += 1
cnt = 0
for key, val in d.items():
    if key <= val:
        cnt += val - key
    else:
        cnt += val
print(cnt)
# Judge status: Wrong Answer
n=int(input())
h=list(map(int,input().split()))
f=[0]+[10**5]*(n-1)
rage=range #lol
for i in rage(1,n):
    for j in range(i-2,i):
        if j>=0:
            f[i]=min(f[i],f[j]+abs(h[i]-h[j]))
print(f[-1])
# Judge status: Accepted
s=input()
s=list(s)
c=0
for i in range(0,len(s),2):
    if s[i]=='0':
        c+=1
for i in range(1,len(s),2):
    if s[i]=='1':
        c+=1
d=0
for i in range(0,len(s),2):
    if s[i]=='1':
        d+=1
for i in range(1,len(s),2):
    if s[i]=='0':
        d+=1
    
print(min(c,d))
# Judge status: Wrong Answer
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]

x,y=map(int,input().split())
if x in A and y in A:
    print('YES')
elif x in B and y in B:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
from math import atan2, degrees

a, b, x = [int(x) for x in input().split()]

temp = 2 * b - 2 * x / a ** 2
if temp < b:
    s = a
    t = temp
else:
    s = 2 * x / a / b
    t = b

theta = degrees(atan2(t, s))
print(theta)
# Judge status: Wrong Answer
a,b,k=map(int, input().split())
s = a-k if k<a else 0 
print('%d %d'%(s, (a+b)-k))
# Judge status: Wrong Answer
from collections import Counter
n=int(input())
a=Counter(list(map(int,input().split()))).most_common()
x=[0,0]

for i in range(len(a)):
  if x[0]<a[i][0] and a[i][1]>=2:
    x[1]=x[0]
    x[0]=a[i][0]
print(x[0]*x[1])
# Judge status: Wrong Answer
a,b,c,k=(int(x) for x in input().split())
if a+b > k:
  print(a)
else:
  print(a+(c-k))
# Judge status: Accepted
#!/usr/bin/env python

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

l = a[0]
r = sum(a)-l
ans = abs(l-r)

for i in range(1, n-1):
    l += a[i]
    r -= a[i]
    if abs(l-r) <= ans:
        ans = abs(l-r)

print(ans)
# Judge status: Wrong Answer
H1, H2, H3, H4, K = map(int, input().split())
up = H1*60 + H2
down = H3*60 - H4
print(down - up - K)
# Judge status: Wrong Answer
def main():
    N = int(input())
    A = list(map(int, input().split()))
    c = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 1:
                return c
            else:
                A[i] = A[i] // 2
        c += 1
    print(c)

main()
# Judge status: Accepted
N, L = map(int, input().split())
S = [input() for i in range(N)]
sorted_S = sorted(S)
print("".join(sorted_S))
# Judge status: Accepted
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans)
# Judge status: Accepted
s = input()
l = [0] * (len(s)+1)

for i in range(len(s)):
    if s[i] == "<":
        l[i+1] = l[i]+1

for i in range(len(s)):
    if s[len(s)-i-1] == ">":
        l[len(s)-i-1] = max(l[len(s)-i-1], l[len(s)-i]+1)

print(sum(l))
# Judge status: Wrong Answer
S=input()
i=0
ans=1
while i<len(S)-1:
    if S[i]==S[i+1]:
        i+=1
    i+=1
    ans+=1
print(ans)
# Judge status: Accepted
N = int(input())
dp = [i for i in range(N+1)]

for i in range(1, 7):
    for j in range(9**i, N+1):
        dp[j] = min(dp[j], dp[j-9**i]+1)
for i in range(1, 7):
    for j in range(6**i, N+1):
        dp[j] = min(dp[j], dp[j-6**i]+1)
print(dp[N])
# Judge status: Accepted
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = np.array(lr())
MOD = 10 ** 9 + 7
length = int(A.max()).bit_length()
answer = 0
for i in range(length):
    B = (A >> i) & 1
    x = np.count_nonzero(B)
    y = N - x
    x *= y
    x *= 2 ** i % MOD
    answer += x

print(answer % MOD)
# Judge status: Wrong Answer
N = str(input())

if "9" == N[0] or "9" == N[1]:
        print( "YES" )
else:
    print( "NO" )
# Judge status: Accepted
n,m = map(int, input().split())
lr = [0, 10**6]
for _ in range(m):
  t = sorted(list(map(int, input().split())))
  lr[0] = max(lr[0], t[0])
  lr[1] = min(lr[1], t[1])

ans = lr[1] - lr[0] + 1
if ans < 0:
  print(0)
else:
  print(ans)
# Judge status: Wrong Answer
N = int(input())
dp = [[]for i in range(87)] 
dp[0] = 2
dp[1] = 1

for i in range(2,87):
    dp[i] = dp[i-1]+dp[i-2]
    if i == N:
        print(dp[i])
        break
# Judge status: Accepted
n,*a=map(int,open(0).read().split())
c=0
for i in range(61):
 i=2**i
 t=sum(i&b and 1for b in a)
 c+=t*(n-t)*i;c%=10**9+7
print(c)
# Judge status: Accepted
N = [int(i) for i in input().split()]
N.sort()

is_even = lambda n: True if n % 2 == 0 else False

flag = False
for n in N:
    if is_even(n):
        flag = True

if flag:
    print(0)
else:
    print(N[0] * N[1])
# Judge status: Accepted
rgb = int(input().replace(" ", ""))

if rgb % 4 == 0:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
s = input()
print(s.rfind("Z") - s.find("A") + 1)
# Judge status: Accepted
q=str(input())
e=str(input())
a=len(q)
b=len(e)
c=""
if a==b:
  for i in range(a):
    c+=q[i]
    c+=e[i]
else:
  for i in range(b):
    c+=q[i]
    c+=e[i]
  c+=q[a-1]

print(c)
# Judge status: Wrong Answer
# coding: utf-8
# Your code here!
N=int(input())

if 1==len(set(list(str(N)))) and int(str(N)[0])==9:
    ans=9*len(str(N))
else:
    ans=9*(len(str(N))-1) + int(str(N)[0])-1

print(ans)
# Judge status: Accepted
# vim: fileencoding=utf-8


def main():
    k, s = map(int, input().split())
    c = 0
    for i in range(k + 1):
        for j in range(k + 1):
            z = s - i - j
            if z >= 0 and z <= k:
                c += 1
    print(c)


if __name__ == "__main__":
    main()
# Judge status: Accepted
#13A - Cookie Exchanges
A,B,C = map(int, input().split())
cnt = 0
while (A%2 + B%2 + C%2) == 0:
    if A == B == C:
        print (-1)
        exit()
    else:
        a = B/2 + C/2
        b = A/2 + C/2
        c = A/2 + B/2
        A = a
        B = b
        C = c
        cnt += 1

print (cnt)
# Judge status: Wrong Answer
mod = 998244353
N = int(input())
D = list(map(int,input().split()))
from collections import Counter
if D[0] != 0:
    print(0)
else:
    dc1 = Counter(D[1:])
    dc = [0 for i in range(max(D))]
    for k,v in dc1.items():
        dc[k-1] = v
    now = 1
    ans = 1
    for i in range(len(dc)):
        if dc[i] == 0:
            ans = 0
            break
        ans = (ans*(dc[i-1]**dc[i]))%mod
    print(ans)
# Judge status: Wrong Answer
N = int(input())
p = list(map(int, input().split()))

c = 0
m = 0
box = []
for i in range(N):
  if p[i] - 1 == i:
    c += 1
    box.append(i)
    if len(box) >= 2 and box[-2] + 1 == box[-1]:
      m += 1
print(c-m)
# Judge status: Accepted
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    s = int(input())
    i = 1
    seen = {s}
    while True:
        i += 1
        if s & 1:
            s = s*3+1
        else:
            s //= 2
        if s in seen:
            print(i)
            break
        else:
            seen.add(s)


if __name__ == '__main__':
    main()
# Judge status: Accepted
i = input()

if "S" in i and "N" not in i:
    print("No")
elif "N" in i and "S" not in i:
    print("No")
elif "E" in i and "W" not in i: 
	print("No")
elif "W" in i and "E" not in i: 
	print("No")
else:
  	print("Yes")
# Judge status: Accepted
import sys
readline = sys.stdin.buffer.readline

k,s = map(int,readline().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        z = s-x-y
        if 0 <= z <= k:
            ans += 1

print(ans)
# Judge status: Wrong Answer
n = int(input())
h = list(map(int, input().split()))

ans = 0
for i in range(n - 1):
  cnt = 0
  for j in range(i, n):
    if h[j] <= h[(j + 1) % n]:
      cnt += 1
  ans = max(ans, cnt)
  
print(ans)
# Judge status: Accepted
n,m = map(int, input().split())
h=list(map(int, input().split()))
good=[True]*n
for i in range(m):
  a,b = map(int, input().split())
  if h[a-1] > h[b-1]:
    good[b-1]=False
  if h[b-1] > h[a-1]:
    good[a-1]=False
  if h[a-1] == h[b-1]:
    good[b-1]=False
    good[a-1]=False
ans=0
for i in good:
  if i:
    ans+=1
print(ans)
# Judge status: Wrong Answer
n = int(input())
a = [int(i) for i in input().split()]
 
m_cost = 10 ** 5
for i in range(min(a), max(a)+1):
    cost = 0
    for j in range(n):
        cost += (a[j] - i) ** 2
    m_cost = cost if cost < m_cost else m_cost
print(m_cost)
# Judge status: Accepted
a,b,c = map(int,input().split())
if b+c-a >= 0:
    print(b+c-a)
else:
    print(0)
# Judge status: Accepted
x = int(input())

if x <= 6:
    print(1)
elif x <= 11:
    print(2)
else:
    ans = (x//11)*2
    if x % 11 != 0:
        ans += 1
    if x % 11 >= 7:
        ans += 1
    print(ans)
# Judge status: Wrong Answer
a = int(input())
s = input()
print(s) if a < 3200 else print('red')
# Judge status: Accepted
K,N = map(int, input().split())
A = list(map(int, input().split()))

d = K-A[N-1]+A[0]
for i in range(N-1):
    d = max(d,A[i+1]-A[i])

print(K-d)
# Judge status: Wrong Answer
S = input()
temp = ["a", "b", "c"]
abc = [S.count(x) for x in temp]
abc.sort(reverse=True)
if abc.count(0) > 0:
    print("NO")  
elif abc[0] == abc[1] == abc[2]:
    print("YES")
elif abc[0] == abc[1] == abc[2]+1:
    print("YES")
elif abc[0] == abc[1]+1 == abc[2]+1:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
N, T = map(int, input().split())
costs = []
for _ in range(N):
    c, t = map(int, input().split())
    if t <= T:
        costs.append(c)

if costs:
    costs.sort()
    ans = costs[0]
else:
    ans = 'TLE'
print(ans)
# Judge status: Wrong Answer
S = input()
print(S + 's' if S[-1] != 's' else 'es')
# Judge status: Accepted
import numpy as np

N=int(input())
X = [int(i) for i in input().split()]
X=np.array(X)

minval = 1000000000000
ans=0
for candidate in range(101):
    tmp = sum((X-candidate)**2)
    if tmp < minval:
        minval=tmp
        ans = candidate

print(minval)
# Judge status: Wrong Answer
x, y, z = input().split()
x = int(x)
y = int(y)
z = int(z)

cnt = 0
rest = x

while(True):
    if(rest - (y + z) > z):
        x -= y + z
        cnt += 1
        rest -= (y + z)
    else:
        break


print(cnt)
# Judge status: Accepted
def solve():
  N = int(input())
  A = list(map(int, input().split()))
  A.sort(reverse=True)
  ans = 0
  for i in range(1,2*N,2):
    ans += A[i]
  return ans
print(solve())
# Judge status: Accepted
import math

a,b,c,d = map(int, input().split())

lcm = int(c*d / math.gcd(c,d))

def num(i):
  ans = b//i - a//i
  if a % i == 0:
    ans +=1
  return ans

lcm_num = num(lcm)

cd_num  = num(c) + num(d)

num = cd_num - lcm_num

print(b-a+1-num)
# Judge status: Wrong Answer
num = int(input())
item = input().split()
res = 0

for i in range(num):
  if i == 0:
    continue
  b = int(item[i - 1])
  t = int(item[i])
  
  if b > t:
    res += (b - t)
      
print(res)
# Judge status: Accepted
s,w=list(map(int, input().split()))

if w>=s:
  print("unsafe")
else:
  print("safe")
# Judge status: Wrong Answer
A, B = input().split()
A = int(A)
B = float(B)
print(int(A*B))
# Judge status: Wrong Answer
W,H,X,Y = map(int,input().split())
xwari = min(X*H,(W-X)*H)
ywari = min(Y*W,(H-Y)*W)
if xwari == ywari:
    f = 1
else:
    f = 0
print(max(xwari,ywari),f)
# Judge status: Accepted
n, k = (int(each) for each in input().split())
a = [int(each) for each in input().split()]
for i in range(n-k):
    if a[i] < a[k+i]:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
N,M = map(int,input().split())
d=[0]*M
res = []
for i in range(M):
    P,Y = map(int,input().split())
    res.append((P,Y,i))
c=0
res.sort()
t = str(res[0][0])
for i in res:
    x = str(i[0])
    tmp = (6-len(x))*'0'+x+(6-len(str(c)))*'0'+str(c)
    if x == t:
        c+=1
    else:
        c=1
        t = x
    d[i[2]] = (6-len(x))*'0'+x+(6-len(str(c)))*'0'+str(c)

for i in d:
    print(i)
# Judge status: Wrong Answer
a=input()
b=input()
if a==1 and b==2:
  print "3"
elif a==2 and b==3:
  print "1"
elif a==3 and b==1:
  print "2"
# Judge status: Wrong Answer
S=list(input())
if S[0]==[1] and S[2]==S[3] and S[0]!=S[2] or S[1]!=S[3]:
  print('Yes')
elif S[0]==S[2] and S[1]==S[3] and S[0]!=S[1] or S[2]!=S[3]:
  print('Yes')
elif S[0]==S[3] and S[1]==S[2] and S[0]!=S[1] or S[2]!=S[3]:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
a = list(input().split())

a.sort()


print(''.join(a))
# Judge status: Accepted
N,K=map(int,input().split())
arr=[0]*N
for _ in range(K):
    d=int(input())
    A=list(map(int,input().split()))
    for a in A:
        arr[a-1]=1
print(N-sum(arr))
# Judge status: Accepted
A,B=map(int,input().split())
ans=0
while(1):
  if 1+ans*(A-1) >= B:
    print(ans)
    break
  else:
    ans += 1
# Judge status: Accepted
n = input()
if n[0] == "9" or n[1] == "9":
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

n,x=MI()
ls=LI()
dp=[0 for i in range(n+1)]
for i in range(n):
    dp[i+1]=dp[i]+ls[i]
#print(dp)
count=0
for d in dp:
    if d<=x:
        count+=1
print(count)
# Judge status: Accepted
K, N = map(int, input().split())
A = list(map(int, input().split()))
dist=0
max_dist=0
max_i=0
for i in range(N):
	a=A[i%N]
	b=A[(i+1)%N]
	tmp=b-a if b>a else K+b-a
	if max_dist<tmp:
		max_dist=max(max_dist,tmp)
		max_i = i
for i in range(N-1):
	i2 = i+max_i+1
	a=A[i2%N]
	b=A[(i2+1)%N]
	tmp=b-a if b>a else K+b-a
	dist+=tmp
print(dist)
# Judge status: Accepted
import math
from itertools import permutations 
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
ans_ = 0
count = 0
sum_list = list(permutations(range(N), N))
for nums in sum_list:
    for i in range(len(nums)-1):
        x1, y1 = xy[nums[i]]
        x2, y2 = xy[nums[i+1]]
        ans_ += math.sqrt((x1-x2)**2+(y1-y2)**2)
    count += 1
print(ans_ / count)
# Judge status: Accepted
from collections import defaultdict

d = defaultdict(int)
N =int(input())
for i in range(N):
  a = int(input())
  d[a] += 1

ans = 0
for a in d:
  ans += d[a] % 2

print(ans)
# Judge status: Accepted
x,y,z=list(map(int,input().split()))
x-=z
print(x//(y+z))
# Judge status: Accepted
n = int(input())
w = list(map(int,input().split()))
ans = abs(sum(w[0:1]) - sum(w[1:n+1]))
for i in range(1,n-1):
  a = abs(sum(w[0:i+1]) - sum(w[i+1:n+1]))
  ans = min(ans,a)
print(ans)
# Judge status: Accepted
def resolve():
    '''
    code here
    '''
    N = int(input())
    Ds = [int(item) for item in input().split()]

    Ds.sort()

    print(Ds[N//2] - Ds[N//2 -1])


if __name__ == "__main__":
    resolve()
# Judge status: Wrong Answer
n, x = map(int, input().split())
a = list(map(int, input().split()))
result = 0
if a[0] > x:
    a[0] = x
for i in range(1, n):
    box2 = a[i-1] + a[i]
    if x < box2:
        result += box2 - x
        a[i] -= abs(box2 - x)
print(result)
# Judge status: Accepted
s = list(input())
head = int(s[0] + s[1])
tail = int(s[2] + s[3])
 
if (0 < head < 13) and (0 < tail < 13):
    print('AMBIGUOUS')
elif 0 < tail < 13:
    print('YYMM')
elif 0 < head < 13:
    print('MMYY')
else:
    print('NA')
# Judge status: Accepted
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

o = S()
e = S()
for i in range(len(o)+len(e)):
    if i%2 == 0:
        print(o[i//2],end = "")
    else:
        print(e[i//2],end = "")
# Judge status: Wrong Answer
a,b,c = map(int,input("enter three integers : ").split())
temp = a
a=b
b=temp
temp = c
c= a
a=temp
print(a,b,c)
# Judge status: Accepted
d, n = map(int, input().split())
print(100 ** d * (n + n // 100))
# Judge status: Accepted
def solve():
    x = int(input())
    if x == 0:
        print(1)
    else:
        print(0)
if __name__ == '__main__':
    solve()
# Judge status: Wrong Answer
n,m = map(int,input().split())
a = [list(input())for i in range(n)]
b = [list(input())for i in range(m)]
for y in range(n-m+1):
    for z in range(n-m):
        count = 0
        for p in range(m):
            if b[p] == a[y+p][z:(z+m)]:
                count += 1
                if count == m:
                    print("Yes")
                    exit()
            else:
                count = 0
print("No")
# Judge status: Wrong Answer
I = ["{0:03d}".format(int(n)) for n in open(0).read().split()]
c = 0
min_z = 10
for i in I:
    x, y, z = map(int, i)
    if 0 < z < min_z:
        min_z = z
    if 0 < z:
        y +=1
    if 9 < y:
        x += 1
        y -= 10
    n = x * 100 + y * 10
    c += n

min_z = (min_z if min_z != 10 else 0)
print(c+min_z-10)
# Judge status: Wrong Answer
sX,sY,tX,tY = list(map(int,input().split()))
ans = ""
a1 = 'U' * (tY-sY) + 'R' * (tX-sX)
a2 = 'D' * (tY-sY) + 'L' * (tX-sX)
a3 = "L" + "U" * (tX-sX+1) + "R" * (tY-sY+1) + "D"
a4 = "R" + "D" * (tY-sY+1) +"L" * (tX-sX+1) +"U"
print(a1+a2+a3+a4)
# Judge status: Accepted
N,M=map(int,input().split())
X=list(map(int,input().split()))
X.sort()
mi=X[0]
ma=X[len(X)-1]
l=[]
c=0
#print(X)
#for i in (mi,ma+1,1):
for i in range(M-1):
    l.append(X[i+1]-X[i])
l.sort()
for i in range(len(l)-(N-1)):
    c=c+l[i]
print(c)
# Judge status: Accepted
AtCoder, s, Contest = input().split()
print(AtCoder[0] + s[0] + Contest[0])
# Judge status: Wrong Answer
a, b = map(int, input().split())
print((b - a) * (b - a - 1) / 2 - a)
# Judge status: Wrong Answer
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A.append(10**10)
B.append(10**10)

L = []
for i in range(N+M):
  if A[0] >= B[0]:
    L.append(B[0])
    B.pop(0)
  else:
    L.append(A[0])
    A.pop(0)

ans = 0
for i in range(N+M):
  ans += L[i]
  if ans > K:
    print(i)
    break
    
if ans <= K:
  print(N+M)
# Judge status: Wrong Answer
a=int(input())
print(input() if a<3200 else 'red')
# Judge status: Wrong Answer
k = int(input())
a, b = list(map(int, input().split()))
s = [i for i in range(a, b) if i % k == 0]
if len(s) == 0:
  print('NG')
else:
  print('YES')
# Judge status: Wrong Answer
c=input()
if c == 'a' or 'e' or 'u' or 'i' or 'o':
    print('vowel')
else:
    print('consonant')
# Judge status: Wrong Answer
n,y=map(int,input().split())
for i in range(n+1):
    for j in range(n-i+1):
        if y==10000*i-5000*j-1000*(n-i-j):
            print(i,j,n-i-j)
            exit()
print(-1,-1,-1)
# Judge status: Wrong Answer
a,b,c,d = map(int,input().split())

print(max(a*b,c*d,b*c,a*d))
# Judge status: Accepted
n=int(input())
a=[]
for i in range(n):
  s=input()
  a.append(s)
print(len(set(a)))
# Judge status: Accepted
H,W = list(map(int,input().split()))
 
if H==1 or W==1:
  print(1)
  exit()
 
if (H*W)%2==0:
  ans = H*W//2
else:
  ans = H*W//2 + 1
  
print(ans)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

A = [A[i]-(i+1) for i in range(N)]
A.sort()
cumsum = [0]*N
cumsum[0] = A[0]
for i in range(1, N):
    cumsum[i] = cumsum[i-1] + A[i]
ans = 1e20
for i in range(N):
    tmp = -(cumsum[i]) + (cumsum[N-1]-cumsum[i]) + (i+1)*A[i] - (N-i-1)*A[i]
    ans = min(ans, tmp)
print(ans)
# Judge status: Accepted
import math
import sys


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

print(max(0,C - (A-B)))
# Judge status: Wrong Answer
a,b,c=(int(x) for x in input().split())
k=int(input())
ans=0
for i in range(0,k):
  c1=c*pow(2,i)
  b1=b*pow(2,(k-i))
  if a<b1 and b1<c1:
    ans=1
    break
  else:
    b1=b
    c1=c

if ans==1:
  print("Yes")
else:
  print("No")