peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
N,A,B,C,D=map(int,input().split())
S=input()

answer="Yes"
possibility=True

if (A>B and C>D) or (A<B and C<D):
    if "##" in S[min(A,C):max(A,C)]:
        answer="No"
    elif "##" in S[min(B,D):max(B,D)]:
        answer="No"
else:
    if "..." not in S:
            answer="No"

print(answer)
# Judge status: Accepted

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

answer = min(b,d) - max(a,c)
print(max(0,answer))
# Judge status: Wrong Answer
N,K = map(int, input().split())
d = []
n = []
for k in range(K):
    d.append(input())
    n.append(input().split())
def flatten(nested_list):
    return [e for inner_list in nested_list for e in inner_list]
nfu = set(flatten(n))
print(nfu)
print(N - len(nfu))
# Judge status: Accepted
data = int(input())
array = list(map(int, input().split()))
high = max(array)
array.remove(high)
p = high/2
a_m = [abs(array[i]-p) for i in range(data-1)]
print(high, array[a_m.index(min(a_m))])
# Judge status: Wrong Answer
xlist = list(map(int,input().split()))

print(xlist.index(0))
# Judge status: Wrong Answer
l = [int(x) for x in input().split(" ")]
N,Q = l[0],l[1]
cumsum = [0]
string = input()
flag = False
for i in range(N):
  if not (string[i]=="A" or string[i]=="C"):
    flag = False
  elif string[i] == "A":
    flag = True
  elif string[i] == "C":
    if flag == True:
      cumsum.append(cumsum[-1]+1)
      continue
  cumsum.append(cumsum[-1])
for i in range(Q):
  t = [int(x) for x in input().split(" ")]
  print(cumsum[t[1]]-cumsum[t[0]])
# Judge status: Wrong Answer
# D - Summer Vacation

# 価値、日数で降順ソートして上から取ってく

n, m = map(int, input().split())
w = []
for _ in range(n):
    w.append(list(map(int, input().split())))

w = sorted(w, key=lambda x: (x[1], x[0]), reverse=True)

ans = 0
for w1 in w:
    if m >= w1[0]:
        ans += w1[1] 
    else:
        break
    m -= 1

print(ans)
# Judge status: Accepted
n=int(input())
task=[list(map(int,input().split())) for _ in range(n)]
task.sort(key=lambda x: x[1])

deadline=0
now=0
for i in range(n):
    now += task[i][0]
    deadline = task[i][1]
    if now > deadline:
        print('No')
        exit()

print('Yes')
# Judge status: Accepted
N = int(input())
X = [0]*N
Y = [0]*N
for TN in range(0,N):
    A,B = (int(T) for T in input().split())
    X[TN] = A-B
    Y[TN] = A+B
print(max(max(X)-min(X),max(Y)-min(Y)))
# Judge status: Accepted
import collections
N=int(input())
S=input()
lis=list(S)
C= collections.Counter(lis)
count=list(C.values())
c=0
for i in range(N):
    for j in range(i,(N+i-1) // 2+1):
        if(lis[i]!=lis[j]):
            if(lis[j]!=lis[2*j-i]):
                if(lis[i]!=lis[2*j-i]):
                    c+=1
if(len(count)==3):
    print(count[0]*count[1]*count[2]-c)
else:
    print(0)
# Judge status: Wrong Answer
def solve():
    C = [list(map(int, input().split())) for _ in range(3)]
    A = [min(c) for c in C]
    B = [min(C[0][i], C[1][i], C[2][i]) for i in range(3)]
    # print(A,B)
    ret = all([C[i][j] == A[i]+B[j] for j in range(3) for i in range(3)])
    print('Yes' if ret else 'No')
    
solve()
# Judge status: Accepted
from functools import reduce
from operator import xor

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

for a in A:
    print(xor(a, xor_sum), end=" ")
print()
# Judge status: Accepted
a=list(input())
b=list(input())
c=list(input())
ans="a"
while True:
  try:
    if ans == "a":
      ans=a[0]
      a=a[1:]
    elif ans == "b":
      ans = b[0]
      b=b[1:]
    elif ans == "c":
      ans = c[0]
      c=c[1:]
  except:
    print(ans.upper())
    break
# Judge status: Accepted
S = input()

if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':
    print(3)
elif (S[0] == 'R' and S[1] == 'R') or (S[1] == 'R' and S[2] == 'R'):
    print(2)
elif S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
    print(1)
else:
    print(0)
# Judge status: Accepted
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

s=input()[::-1]
n=len(s)
a=[0]*2019
a[0]=1
c,d=0,1
for i in s:
    c+=int(i)*d
    c%=2019
    d*=10
    d%=2019
    a[c]+=1
ans=0
for i in a:
    ans+=i*(i-1)//2
print(ans)
# Judge status: Accepted
import sys
from fractions import gcd

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

X, Y = inm()


def solve():
    if X % Y == 0:
        return -1
    return X * (Y + 1)


print(solve())
# Judge status: Accepted
import sys #sys.stdin.readline()
import heapq #heap
from collections import defaultdict
fastinp = lambda: sys.stdin.readline().split(' ')
inp = lambda: input().split(' ')
ml = lambda x, y=int: list(map(y, x))
debug = lambda *args: print(*args, sep=' | ')
a, b, c = ml(inp())
if a == b and a != c:
    print('Yes')
elif b == c and a != b:
    print('Yes')
elif a == c and b != a:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
x = int(input())
print((x/500)*1000 + ((x%500)/5)*5)
# Judge status: Wrong Answer
n = set(map(int, input()))
print(len(n))
# Judge status: Wrong Answer
A, B = map(int,input().split())
def ma(A, B):
    x = max(A, B)
    ans = 2 * x - 1
    return ans
print(ma(A, B))
# Judge status: Accepted
N = int(input())
arr = list(map(int, input().split()))
ans = 1000
kabu = 0
flg = True
for i in range(N-1):
    if flg and arr[i] < arr[i+1]:
        tmp = ans//arr[i]
        ans -= tmp*arr[i]
        kabu += tmp
        flg = False
    if not flg and arr[i] > arr[i+1]:
        ans += kabu*arr[i]
        kabu = 0
        flg = True
print(ans+kabu*arr[-1])
# Judge status: Accepted
#B
import numpy as np
n,m=map(int,input().split())
a=list(np.fromstring(input(),int,sep=' '))
a.sort(reverse=True)
if a[m-1]<sum(a)/(4*m):
    print("No")
else:
    print("Yes")
# Judge status: Accepted
print(0 if input()=='1' else 1)
# Judge status: Accepted
d = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(d)]
for i in range(d):
    print(i % 26 + 1)
# Judge status: Accepted
N = int(input())
A = []
for _ in range(N):
	A.append(int(input()))
B = sorted(A, reverse = True)
m1, m2 = B[0], B[1]
for i in range(N):
	if m1 > A[i]:
		print(m1)
	else:
		print(m2)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = sum(B)

for i in range(N-1):
    if A[i]+1 == A[i+1]:
        #print(str(A[i])+ " : " +str(A[i+1]))
        ans += C[A[i]-1]

print(ans)
# Judge status: Wrong Answer
a = [i*i for i in range(80)]
n,d = map(int,input().split())
x = []
for _ in range(n):
    x.append(list(map(int,input().split())))
ans = 0
for i in range(n-1):
    for j in range(i+1, n):
        s = 0
        for k in range(d):
            s += (x[i][k]-x[j][k])**2
        if s in a:
            ans += 1
print(ans)
# Judge status: Wrong Answer
n = int(input())
a = set(map(int, input().split()))
q = int(input())
ll = []
for i in range(q):
	l = list(map(int, input().split()))
	ll.append(l)
    
for i in ll:
  if i[0] in a:
    a = [i[1] if j == i[0] else j for j in a]
    print(sum(a))
  else:
    print(sum(a))
# Judge status: Accepted
N, A, B, C, D = map(int, input().split())
S = input()
print('No' if '##' in S[A:C-1] or '##' in S[B:D-1] or C == D or C > D and '...' not in S[B-2:D+1] else 'Yes')
# Judge status: Wrong Answer
L,R,d=map(int,input().split())
print(int(R/d)-int(L/d))
# Judge status: Accepted
n,a,b=map(int,input().split())
s=list(input())
ryo,kai=0,0
for i in range(len(s)):
    if s[i] == 'a' and ryo<(a+b):
        ryo+=1
        print('Yes')
    elif s[i] == 'b' and ryo<(a+b) and kai<b:
        ryo+=1
        kai+=1
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
s=input()
a=[0]*(len(s)+1)
r=0
l=0
for i in range(len(a)):
  j=i
  if r==0:
    while j < len(s) and s[j] == '>':
      r+=1
      j+=1
  else:
    r-=1
  if i !=0 and s[i-1] == '<':
    l+=1
  else:
    l=0
  a[i]=max(l,r)
print(sum(a))
# Judge status: Accepted
import math 
import bisect
import heapq
from collections import deque

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

l = [0] * n
l[0] = 0
for i in range(1,n):
    l[i] = l[i-1] + 1 if h[i-1] >= h[i] else 0

print(max(l))
# Judge status: Wrong Answer
S = input()
resA=0
resZ=0
for i in range(len(S)):
	if S[i]=='A' and resA==0:
		resA=i
	elif S[i]=='Z':
		resZ=i
if resA !=0 and resZ !=0:
	print(resZ-resA+1)
else:
	print(0)
# Judge status: Accepted
import sys

def lcm(a, b):
    a, b = max(a, b), min(a, b)
    c = a * b
    while a % b > 0:
        a, b = b, a % b
    return c // b

def solve():
    input = sys.stdin.readline
    X = int(input())
    L = lcm(360, X)
    print(L // X)

    return 0

if __name__ == "__main__":
    solve()
# Judge status: Accepted
#!/usr/bin/env python3

D = int(input())

if D == 25:
    print("Christmas")
elif D == 24:
    print("Christmas Eve")
elif D == 23:
    print("Christmas Eve Eve")
elif D == 22:
    print("Christmas Eve Eve Eve")
# Judge status: Accepted
w,a,b=map(int,input().split())
A=[i for i in range(a,a+w+1)]
B=[i for i in range(b,b+w+1)]
if a in B or b in A:
    print(0)
else:
    print(min(abs(a+w-b),abs(b+w-a)))
# Judge status: Accepted
A, B, X = map(int, input().split())

def f(N):
    return N // X

print(f(B) - f(A - 1))
# Judge status: Accepted
import sys
l, r = map(int, input().split())
lmod673 = l % 673
dif = r - l

if lmod673 + dif >= 673:
  print(0)
  sys.exit()

min_val = 2018
for bigger in range(l, r+1):
  for smaller in range(l, bigger):
    min_val = min(min_val, bigger*smaller % 2019)
print(min_val)
# Judge status: Wrong Answer
[N,K]=list(map(int, input().split()))
h=list(map(int, input().split()))
K=min(N,K)
 
dp=[[0 for i in range(K+1)] for j in range(N)]
 
for i in range (1,K):
    for j in range (0,i):
        dp[i][j]=dp[i-j-1][K]+abs(h[i-j-1]-h[i])
        dp[i][K]=min(dp[i][0:j+1])
 
for i in range (K,N):
    for j in range (0,K):
        dp[i][j]=dp[i-j-1][K]+abs(h[i-j-1]-h[i])
 
print(dp[N-1][K])
# Judge status: Wrong Answer
import sys

a, b = [int(x) for x in sys.stdin.readline().strip().split(" ")]
if (a + b) % 2 == 1:
    print((a + b + 1) / 2)
else:
    print((a + b) / 2)
# Judge status: Wrong Answer
N = int(input())
S = list(input())
ans = 0
for i in range(N):
  A = S[:i]
  B = S[i:]
  C = list(set(A) & set(B))
  print(C)
  c = len(C)
  if c > ans:
    ans += 1

print(ans)
# Judge status: Accepted
n = int(input())
hold = 0
res = 0
for i in range(n):
    a = int(input())
    if i==0:
        res += a//2
        hold = a%2
    else:
        if a < hold:
            res += a
            hold = 0
        else:
            res += hold
            a -= hold
            res += a//2
            hold = a%2
print(res)
# Judge status: Accepted
S = list(input())
S = ''.join(sorted(S))
print('Yes' if S == 'abc' else 'No')
# Judge status: Wrong Answer
n = int(input())
s = [int(input()) for _ in range(n)]
a = sum(s)
m = min(s)
print(a if a % 10 else a - m)
# Judge status: Accepted
import fractions
A, B, K = map(int, input().split())

answer = []
ans = 1
max_ans = fractions.gcd(A, B)
while ans <= max_ans:
    if A % ans == 0 and B % ans == 0:
        answer.append(ans)
        ans += 1
    else:
        ans += 1
answer = sorted(answer, reverse=True)

print(answer[K-1])
# Judge status: Accepted
T = input()
T = T.replace('?', 'D')

print(T)
# Judge status: Wrong Answer
N,R=map(int,input().split())
if N<10:
  print(100*(10-N))
else:
  print(R)
# Judge status: Wrong Answer
import numpy as np
N,D = map(int,input().split())
a=0
for i in range(N):
    x,y = map(int,input().split())
    if np.sqrt(x^2+y^2)>=D:
        a=a+1
print(a)
# Judge status: Accepted
N,K = map(int,input().split())

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

s = sorted(p)

ans = 0 
for i in range(N):
    ans += s[i]
    if i == K-1:
        break

print(ans)
# Judge status: Wrong Answer
import sys
input = lambda: sys.stdin.readline().rstrip()

h1, m1, h2, m2, k = map(int, input().split())

m = (h2 - h1)*60
a = m2 - m1 if m2 - m1 >= 0 else 60 + m2 - m1
if m + a - k >= 0:
    print(m + a - k)
else:
    print(0)
# Judge status: Wrong Answer
rangeNum = int(input())
n = list(map(int, input().split()))

ans = True
for ni in range(rangeNum):
    if n[ni] % 2 == 0:
        if n[ni] % 3 == 0:
            break
        elif n[ni] % 5 == 0:
            break
        else:
            ans = False
    else:
        ans = False
if ans==True:
    print("APPROVED")
else:
    print("DENIED")
# Judge status: Wrong Answer
N = int(input())

print(N // 2 + (0 if N % 2 == 0 else 0))
# Judge status: Accepted
n=int(input())
import math
move_min=1+n-2
for i in range(2,int(math.sqrt(n)+1)):
    if n%i==0:
        move_min=min(move_min,i+n//i-2)
print(move_min)
# Judge status: Wrong Answer
N, M = map(int, input().split())

ac = 0
wa = 0

l = [0] * (N + 1)

for num in range(M):
    p, s =  input().split()
    p = int(p)
    if s == "AC":
        if l[p] == 0:
            ac += 1
        
        l[p] = 1
    else:
        if l[p] == 0:
            wa += 1
        
print(*[ac, wa])
# Judge status: Wrong Answer
n, l = map(int, input().split())
a = [l + i for i in range(n)]
if l + n - 1 < 0:
    a.pop(n - 1)
elif l > 0:
    a.pop(0)
    print(a)
print(sum(a))
# Judge status: Wrong Answer
N=int(input())
a=input().split()
A=[int(b) for b in a]
first=A[0]
last=A[-1]
del A[0]
del A[-1]
if N==2:
    print(abs(first-last))
else:
    average = sum(A) // 2
    number = 0
    for a in range(1, N - 1):
        number += A[a]
        if number >= average:
            break
    a1 = abs(sum(A[:a]) + first - last - sum(A[a:]))
    a2 = abs(sum(A[:a + 1]) + first - last - sum(A[a + 1:]))
    print(min(a1, a2))
# Judge status: Wrong Answer
n = int(input())
xy = [list(map(int,input().split())) for _ in range(n)]
a = []
b = []
for i in range(n):
    a.append(abs(xy[i][0]+xy[i][1]))
    b.append(abs(xy[i][0]-xy[i][1]))
a_sort = sorted(a)
b_sort = sorted(b)

print(max(a_sort[-1]-a_sort[0],b_sort[-1]-b_sort[0]))
# Judge status: Accepted
a,b = map(int,input().split())
if a>0:
    print("Positive")
elif a<=0 and b>=0:
    print("Zero")
else:
    n = b-a+1
    if n%2==0:
        print("Positive")
    else:
        print("Negative")
# Judge status: Accepted
h,n = map(int,input().split())
a = [int(i) for i in input().split()]
print("Yes" if sum(a) >= h else "No")
# Judge status: Accepted
x = int(input())
c=1
for b in range(1,x):
    for p in range(2,x):
        if b**p<=x:
            c=max(c,b**p)
        else:break
print(c)
# Judge status: Accepted
def main():
    a, b, x = map( int, input().split())
    print(b//x - (a-1)//x)
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")
# Judge status: Accepted
import itertools
import bisect

N, X = map(int, input().split())
*L, = map(int, input().split())

A = list(itertools.accumulate(L))
print(bisect.bisect(A, X) + 1)
# Judge status: Accepted
import numpy as np

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

Cn, ans = N * (N-1) // 2, 0

for i in range(60):
    count = int(np.sum(A % 2))
    A //= 2
    if count == 0:
        continue
    ans += (Cn - (count*(count-1)//2 + (N-count)*(N-count-1)//2)) * (2**i)
print(ans % (10**9 + 7))
# Judge status: Wrong Answer
N=int(input())
h=list(map(int, input().split()))

ans = 'Yes'

for i in range(N-1):
    if h[i] <= h[i+1]:
        ans = 'Yes'
        continue
        print(i)
    if h[i] == (h[i+1]-1):
        ans = 'Yes'
        continue
    else:
        ans = 'No'

print(ans)
# Judge status: Accepted
s=input()
day=['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
for i in range(len(day)):
    if(s==day[i]):
        print(7-i)
        break
# Judge status: Wrong Answer
n = int(input())
ans = 1000 - (n % 1000)
print (ans)
# Judge status: Accepted
n = int(input())

i = 0
while True:
    if i*(i+1)//2 >= n:
        break
    i += 1

while True:
    print(i)
    n -= i
    i -= 1
    if n == 0:
        break
    if n - i <= 0:
        print(n)
        break
# Judge status: Wrong Answer
import math
N=int(input())
x=math.ceil(N/1.08)
if x == N:
  print(x)
else:
  print(":(")
# Judge status: Wrong Answer
n,m = map(int, input().split())
pairs = [input().split() for _ in range(n)]
pairs.sort(key = lambda x:x[0])
count = 0
ans = 0
for i in pairs:
    ans += int(i[0])*int(i[1])
    count += int(i[1])
    if count >= m:
        ans -= int(i[0])*(count - m)
        break
print(ans)
# Judge status: Wrong Answer
s = input()
ls = list(map(int,list(s)))
lt = [0]
for i in range(1,len(s)):
  lt.append(ls[i-1]+ls[i])

ans = 0
while 1 in lt:
  flg = 1
  n = len(ls)
  for i in range(1,n):
    if flg == 1 and lt[n-i] == 1:
      ls = ls[:n-i-2] + ls[n-i:]
      ans += 2
      flg = 0
    elif flg == 0:
      flg = 1
  lt = [0]
  for i in range(1,len(ls)):
    lt.append(ls[i-1]+ls[i])
print(ans)
# Judge status: Wrong Answer
# Hello World program in Python
def gcd(a, b):
	if b == 0: return a
	return gcd(b, a%b)

def lcm(a, b):
	return (a*b)/gcd(a,b);

A = []

def main():
    N = int(raw_input())
    A = map(int, raw_input().split())
    l = 1
    for x in A:
        l = lcm(l, x)
    ans, mod = 0, 1000000007
    for x in A:
        ans = (ans + l/x)
        ans = ans % mod
    print(ans)
# Judge status: Accepted
import math
import bisect
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
for _ in range(M):
    x=math.floor(A.pop(N-1)/2)
    bisect.insort(A,x)
print(sum(A))
# Judge status: Wrong Answer
n = int(input())
a  = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
#ここまで入力
manzoku = 0
for i in range(n):
    if a[i] ==n:
        manzoku += b[a[i]-1]
    elif i == n-1:
        manzoku += b[a[i]-1]
    else:
        manzoku += (b[a[i]-1]+c[a[i]-1])
print(manzoku)
# Judge status: Accepted
import sys
input = sys.stdin.readline
from collections import deque

K = int(input())
q = deque([])

for i in range(1, 10):
    q.append(i)

cnt = 0
    
while q:
    v = q.popleft()
    cnt += 1
    
    if cnt==K:
        print(v)
        exit()
    
    for i in range(max(0, v%10-1), min(9, v%10+1)+1):
        q.append(10*v+i)
# Judge status: Accepted
coins = [100, 101, 102, 103, 104, 105]
MAX = 100000
# 100の判定
result = list()
for i in range(MAX + 1):
    if(i % coins[0] == 0) : result.append(1)
    else : result.append(0)

# 101以降
for coin in coins[1:]:
    for j in range(coin, MAX+1):
        result[j] += result[j-coin]

X = int(input())
if(result[X] >= 1): print('1')
else : print('0')
# Judge status: Accepted
def Main(S):
    N = len(S)
    r_S = S[::-1]
    A = S[:(N-1)//2]
    r_A = A[::-1]
    B = S[(N+1)//2:]
    r_B = B[::-1]
    return "Yes" if S == r_S and A == r_A and B == r_B else "No"
    

def main():
    S = str(input())
    print(Main(S))

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import collections
n = int(input())
s = []
for i in range(n):
  s.append(input())
s.sort()
#print(s)
c = collections.Counter(s)
#print(c.most_common())
m = c.most_common()[0][1]
l = len(c.most_common())
for i in range(l):
  if c.most_common()[i][1] == m:
    print(c.most_common()[i][0])
  else:
    break
# Judge status: Wrong Answer
n=int(input())
l=list(map(int,input().split()))
mod=10**9+7
import fractions
a=l[0]
for i in range(1,n):
   l[i]%=mod
   a=(a*l[i]//(fractions.gcd(a,l[i])))%mod
list=[(a//l[i])%mod for i in range(n)]
print(sum(list)%mod)
# Judge status: Accepted
N = int(input())

from collections import defaultdict
counter = defaultdict(int)

for k in range(1,N+1):
    temp = list(str(k))
    counter[(int(temp[0]),int(temp[-1]))] += 1

ans = 0
for i in range(1,10):
    for j in range(1,10):
        ans += counter[(i,j)]*counter[(j,i)]
print(ans)
# Judge status: Wrong Answer
S=input()
if len(S)==len(set(S)):
	print("Yes")
else:
	print("No")
# Judge status: Accepted
a,b,t=map(int,input().split())

time=a
cnt=0
i=1
while time <= t+0.5:
    cnt+=b
    i +=1
    time += a

print(cnt)
# Judge status: Accepted
a,b,c=map(int,input().split())
if (a*100+b*10+c)%4==0:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n = int(input())
cnt = 0
for a in range(1, n):
    for b in range(1, n):
        if a * b < n:
            cnt += 1
        else:
            break
print(cnt)
# Judge status: Wrong Answer
N = int(input())
ans = 0
for num in range(1,N+1):
  cnt = 0
  for i in range(1,num):
    if num%i==0:
      cnt=cnt+1
      
  if cnt==8:
    ans = ans+1
   
print(ans)
# Judge status: Accepted
S=input()
L=len(S)
ans=''
for i in range(L):
	ans=ans+'x'
print(ans)
# Judge status: Accepted
n, k = map(int, input().split())

ans = 0
for i in range(1, n + 1):
    count = 0
    while i * (2 ** count) < k:
        count += 1
    ans += 1 / n * (0.5 ** count)
    
print(ans)
# Judge status: Accepted
n = int(input())
line = list(map(int, input().split()))
ans = ['0' for i in range(n)]
for i in range(n):
  ans[line[i]-1] = str(i+1)
print(' '.join(ans))
# Judge status: Accepted
stdin = open(0).read().split('\n')
N, K = map(int,stdin[0].split())
S = stdin[1]
l=list(S)
l[K-1]=l[K-1].lower()
print("".join(l))
# Judge status: Accepted
a,b,x = map(int, input().split())

s = (a-1)//x
if a == 0: s = -1
p = b//x

print(p - s)
# Judge status: Accepted
def main():
    S=set(list(input()))
    flag=0
    if len(S)%2:
        flag=1
    if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)):
        flag=1
    if len(S)==4:
        flag=0
    print('No' if flag else 'Yes')

main()
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
B = [ A[i]-i-1 for i in range(n) ]
B.sort()
idx = n//2
print( sum( [ abs(b-B[idx]) for b in B ] ) )
# Judge status: Accepted
import sys
n = int(input())
array = list(map(int,input().split()))

if not ( 3 <= n <= 20 ): sys.exit()

count = 0
for I in range(n-2):
    if array[I] < array[I+1] < array[I+2]: count += 1
    if array[I] > array[I+1] > array[I+2]: count += 1
print(count)
# Judge status: Accepted
a,b,c,x,y = map(int,input().split())

if a+b > 2*c:
  if x <= y:
    ans = x*c*2 + (y-x)*min(b,2*c)
  elif y < x:
    ans = y*c*2 + (x-y)*min(a,2*c)
    
else:
  ans = x*a + y*b
  
print(ans)
# Judge status: Accepted
from collections import defaultdict

n,m = map(int, input().split())
dic = defaultdict(lambda:0)
for _ in range(n):
  ar = list(map(int, input().split()))
  for i in range(1,len(ar)):
    dic[ar[i]] += 1

ans = 0
for i,v in dic.items():
  if v == n:
    ans += 1
print(ans)
# Judge status: Accepted
S = input()
K = int(input())
one = 0

for char in S:
    if char == "1":
        one += 1
    else:
        break

if K <= one:
    print(1)
elif one > 0:
    print(S[one])
else:
    print(S[0])
# Judge status: Accepted
import sys

N, K = map(int, sys.stdin.readline().split())
h = tuple(map(int, sys.stdin.readline().split()))
cost = [None]*N
cost[0] = 0

for i in range(N):
    for j in range(1, K+1):
        if i + j > N-1:
            break
        tmp = cost[i] + abs(h[i] - h[i+j])
        if cost[i+j] == None or cost[i+j] > tmp:
            cost[i+j] = tmp

print(cost[N-1])
# Judge status: Accepted
l = int(input())
sum = 0
c = 0

for i in range(1,l):
  for ii in range(i,l):
    sum = i * ii
    if sum >= l:
      break
    else:
      if i != ii:
        c+=2
      else:
        c+=1

print(c)
# Judge status: Accepted
n,k=map(int,input().split())
a=list(map(int,input().split()))


p1=0
p2=k

for i in range(k,n):
    if a[p2]>a[p1]:
        print('Yes')
    else:
        print('No')
    p1+=1
    p2+=1
# Judge status: Wrong Answer
N=int(input())
v=list(map(int,input().split()))
v.sort()
print(v)
ans=0
for i in range(N):
    ans+=(v[i])/(2**(N-i))
ans+=(v[0])/(2**N)
print(ans)