peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N = int(input())
x = 200_001
P = list(map(int, input().split()))
cnt = 0
for p in P:
    if p < x:
        cnt += 1
        x = p
print(cnt)
# Judge status: Wrong Answer
A, B, C, K = map(int, input().split()) 
if K==0:
    if A-B<=10**18:
        print(A-B)
    else:
        print("Unfair")
else:
    if B-A<=10**18:
        print(B-A)
    else:
        print("Unfair")
# Judge status: Wrong Answer
import math

r = int(input())

l = 2.0*r*math.pi
# Judge status: Wrong Answer
N,C,K = map(int,input().split())
li = []
for t in range(N):
  li.append(int(input()))

count = 0
ans = 0

newLi = sorted(li)

while(len(newLi)):
  for c in range(C - 1):
    if len(newLi) < c + 2:
      continue
    
    if newLi[1] <= newLi[0] + K:
      newLi.pop(1)
    else:
      break

  newLi.pop(0)
  ans += 1

print(ans)
# Judge status: Accepted
d, t, s = map(int, input().split())

if d / s <= t:
    print('Yes')
    exit()
else:
    print('No')
    exit()
# Judge status: Accepted
n,k=map(int, input().split())
print((n+k-3)//(k-1))
# Judge status: Accepted
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

c, *N = str(int(readline())+1)
print(int(c) + 9 *len(N)- 1)
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def f(a, b):
    return pow(a, 5) - pow(b, 5)
 
def main():
    x = int(readline())    
    for i  in range(-1000, 1001):
        for j in range(-1000, 1001):
            if i**5 - j**5 == x:
                print(i, j)
                return
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7 # 998244353
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    S=input()
    n=len(S)

    for i in range(n-6):
        if(S[:i]+S[n-7+i:]=="keyence"):
            print("YES")
            return

    print("NO")
resolve()
# Judge status: Wrong Answer
s=input()
if s=='Sunny':
    print('Cloudy')
elif s=='Cloudy':
    print('Rainny')
else:
    print('Sunny')
# Judge status: Wrong Answer
n,m = map(int,input().split())

ans = 0
if m%n == 0:
    print(m//n)
    exit()
    
for i in range(1,int(m**0.5)+1):
    if m%i == 0 and i <=m//n:
        ans = max(ans,i)
print(ans)
# Judge status: Accepted
s = input()
while True:
    if s.endswith("dream"):
        s = s[:-5]
    elif s.endswith("dreamer"):
        s = s[:-7]
    elif s.endswith("erase"):
        s = s[:-5]
    elif s.endswith("eraser"):
        s = s[:-6]
    elif not s:
        print("YES")
        break
    else:
        print("NO")
        break
# Judge status: Accepted
A,B = map(int,input().split())
if (A+B)%2 == 0:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")
# Judge status: Wrong Answer
N,K=map(int,input().split())
h=[int(input()) for i in range(N)]
h.sort()
a=1000
for i in range(N-K):
  if h[i+K]-h[i]<a:
    a=h[i+K]-h[i]
print(a)
# Judge status: Wrong Answer
n,k = map(int,input().split())
a = list(map(int,input().split()))
p = min(a)
ans = 0
indl = [-1,n]
for i in range(n):
  if a[i]==p:
    indl.append(i)
indl.sort(reverse=True)
for i in range(len(indl)-1):
  ans += (indl[i]-indl[i+1]-1)//(k-1)+((indl[i+1]-indl[i]-1)%(k-1)!=0)
print(ans)
# Judge status: Wrong Answer
S = list(map(str,input().split()))
ans = 25
for s in S:
    if s == "Eve":
        ans -= 1

print(ans)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

if a < c < b:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
if int(input())%500<=int(input()):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N, X, T = map(int, input().split())

n = N // X
r = N % X
if r == 0:
    print(T * n)
else:
    print(T * (n + 1))
# Judge status: Accepted
a, b = map(int, input().split())
if a <= 0 <= b:
  print("Zero")
elif 0 < a:
  print("Positive")
else:
  if (b - a + 1) % 2 == 1:
    print("Negative")
  else:
    print("Positive")
# Judge status: Accepted
n, r = map(int, input().split())

if n >= 10:
    ans = r
else:
    ans = r + 100*(10-n)
print(ans)
# Judge status: Accepted
N,M=map(int,input().split())
SC=[list(map(int,input().split())) for i in range(M)]

def check(x):
  x=str(x)#文字に変換
  if len(x)!=N:
    return False
  for s,c in SC:
    if x[s-1]!=str(c):
      return False
  return True

for i in range(1000):
  if check(i):
    print(i)
    exit()
print(-1)
# Judge status: Accepted
x = int(input())
flag =1
for a in range(-255,255):
  if flag ==0:
    break
  for b in range(-255,255):
    if a**5 -b**5 == x:
      print(a,b)
      flag =0
      break
# Judge status: Accepted
N = int(input())
S = input()

if(S[:int(N/2)] == S[int(N/2):]):
        print("Yes")
else:
        print("No")
# Judge status: Accepted
n, r = map(int, input().split())

if n >= 10:
  print(r)
else:
  print(r+100*(10-n))
# Judge status: Accepted
n = int(input())
p = list(map(int,input().split()))

ans = 0
for i in range(n):
    if(i == 0):
        pass
    elif (i == n - 1):
        pass
    else:
        a = p[i - 1]
        b = p[i]
        c = p[i + 1]
        lst = [a, b ,c]
        lst.sort()
        if (lst[1] == b):
            ans = ans + 1
print(ans)
# Judge status: Wrong Answer
#入力
N, L = list(map(int,input().split()))
A = [None for _ in range(N)]
#食べるリンゴは絶対値が最も小さいリンゴであるので絶対値が最小のリンゴを求め、その味をMに記録
m = float('inf')
M = 0
for i in range(N):
  A[i] = L + i
  if m > abs(A[i]):
    m = abs(A[i])
    M = A[i]
print(M)    
#結果
print(sum(A) - M)
# Judge status: Accepted
N = int(input())

count = 0
for _ in range(N):
  D = map(int, input().split())
  D = list(D)
  if D[0] == D[1]:
    count += 1
    if count >= 3:
      print('Yes')
      break
    continue
  count = 0
else:
  print('No')
# Judge status: Wrong Answer
x = int(input())
x -= 599
a = x//200
print(8 - a)
# Judge status: Accepted
n, k = map(int, input().split())
a = list(map(int, input().split()))


for i in range(k, n):
    if a[i-k] < a[i]:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    S = input()

    first = int(S[:2])
    second = int(S[2:])

    if first == 0 or second == 0:
        print('NA')
    elif first > 0 and second > 0:
        print('NA')
    elif first > 12 and second <= 12:
        print('YYMM')
    elif first <= 12 and second > 12:
        print('MMYY')
    else:
        print('AMBIGUOUS')


if __name__ == "__main__":
    main()
# Judge status: Accepted
n,k = map(int, input().split())

probability = 0
for i in range(1,n+1):
    p = 1/n
    p_head = 1/2
    flips = 0
    prob = p * p_head**flips
    score = i
    
    while score < k:
        flips += 1
        prob = p * p_head**flips
        score = score * 2

    probability += prob


print(probability)
# Judge status: Wrong Answer
n=int(input())
a=sorted(list(map(int,input().split())))
b=sorted(list(map(int,input().split())))
for i in range(n):
    if a[i]>b[i]:
        print('No')
        exit()
    elif 2*b[i]-a[i]>10**9:
        print('No')
        exit()
print('Yes')
# Judge status: Accepted
a, b, c = map(int,input().split())

s = (a+b+c)/2

ans = (s*(s-a)*(s-b)*(s-c))**(0.5)

print(int(ans))
# Judge status: Accepted
N,M = map(int,input().split())
py = []

for i in range(M):
    p,y = map(int,input().split())
    py.append([p,y,i])

py.sort()

P = [0]*(N+1)
ID = []

for p,y,i in py:
    
    P[p] += 1 ##どの県に何個市があるかカウント

    p_tmp = str(p)
    y_tmp = str(P[p])

    upper = "0"*max(0,6-len(p_tmp))+p_tmp
    lower = "0"*max(0,6-len(y_tmp))+y_tmp

    ID.append([i,upper+lower])

ID.sort()

for _,i in ID:
    print(i)
# Judge status: Accepted
N = int(input())
for i in range(1,10):
    for j in range(1,10):
        if i*j==N:
            print('Yes')
            exit()
print('No')
# Judge status: Accepted
N =[int(i) for i in input().split(" ")]
count=0
for j in range(len(N)-1):
    for k in range(j+1,len(N)):
        if N[j]==N[k]:
            count += 1
if count==1:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
L = sorted(list(map(int,input().split())))
ans = 0
while L[0] != L[1] or L[1] != L[2]:
    ans += 1
    if L[0]+2 <= L[2]:
        L[0] += 2
    else:
        L[0] += 1
        L[1] += 1
    L = sorted(L)
print(ans)
# Judge status: Accepted
N = int(input())
flag = 0
for i in range(N//4 + 1):
    for j in range(N//7 + 1):
        if N == (4*i + 7*j):
            flag = 1
if flag == 1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a,b,c=[int(i) for i in input().split()]

a=a%b
ans=0
for i in range(b):
    if (a*i)%b==c:
        ans+=1
if ans==0:
    print("NO")
else:
    print("YES")
# Judge status: Accepted
# APC 001: A – Two Integers
x, y = map(int, input().split())
print('-1' if x % y == 0 else x)
# Judge status: Accepted
s=list(input())
s=set(s)

if len(s)==2: print('Yes')
else: print('No')
# Judge status: Accepted
n = int(input())
if n%2 == 1:
  print(0)
else:
  ans = n//10
  for i in range(1,26):
    ans += n//(5**i*10)
  print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
  b.append(0)
k = 0
if(n%2==1):
  k = (n-1)//2
else:
  k = n//2
for i in range(n):
  if(i%2==0):
    b[k+ ((-1)**n%2)*i//2]=a[i]
  else:
    b[k-((-1)**n%2)*(i+1)//2]=a[i]
ans = ""
for i in range(n):
  ans += str(b[i])+" "
print(ans)
# Judge status: Accepted
S, T = input().split()
s, t = map(int, input().split())
U = input()

if S == U:
    print(s - 1, t)
else:
    print(s, t - 1)
# Judge status: Accepted
N,M,K=map(int,input().split())
cond=False
for i in range(N+1):
  for j in range(M+1):
    b=i*(M-j)+j*(N-i)
    if b==K:
      cond=True
      break
  if cond:
    break
print("Yes" if cond else "No")
# Judge status: Accepted
import sys
readline = sys.stdin.readline

def main():
    N = int(readline())
    A = list(map(int, readline().rstrip().split()))
    Ai = [a-i-1 for i, a in enumerate((A))]
    Ai.sort()
    if N % 2 == 1:
        b = Ai[N//2]
    else:
        b = (Ai[N//2-1] + Ai[N//2]) / 2

    print(int(sum([abs(a-b) for a in Ai])))


if __name__ == '__main__':
    main()
# Judge status: Accepted
N,M = map(int,input().split())

if N == 1 and M == 1:
  print(1)
  exit()
if N == 1:
  print(M-2)
  exit()
if M == 1:
  print(N-2)
  exit()

ans = (M-2)*(N-2)
print(ans)
# Judge status: Accepted
N,M,Q = map(int,input().split())
query = [None] * Q
for i in range(Q):
  query[i] = list(map(int,input().split()))
  
def calc(arr,query):
  res = 0
  for a,b,c,d in query:
    if arr[b-1] - arr[a-1] == c:
      res += d
  return res
  
ans = 0
import itertools
for arr in itertools.combinations_with_replacement(range(1,M+1),N):
  val = calc(arr,query)
  if ans < val:
    ans = val
print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-

s = input()
before = '-'
for i in s:
    if i == before:
        print('Bad')
        exit(0)

    before = i

print('Good')
# Judge status: Accepted
#ABC130 C-Rectangle Cutting 14:59

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

def func(W,H,x,y):
    if x == W/2 and y == H/2:
        return W*H/2, 1
    else:
        return W*H/2, 0
print(*func(W,H,x,y))
# Judge status: Wrong Answer
s = list(input())
t = list(input())

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

s_len = len(s)
t_len = len(t)

if(s_len < t_len):
    short = s_len
else:
    short = t_len

flag = False
equal = True
for i in range(short):
    if(s[i] < t[i] and equal == True):
        flag = True
        break
    elif(s[i] == t[i] and s < t):
        continue
    else:
        break

else:
    flag = True

if(s < t or flag):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n = int(input())
print(n % 1000)
# Judge status: Accepted
A, B, C = map(int, input().split())
if A == B and A != C:
    print('Yes')
elif A == C and A != B:
    print('Yes')
elif B == C and B != A:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n=int(input())
print(n//2*(n+1)//2) if n%2 else print(n//2**2)
# Judge status: Accepted
n, k = map(int, input().split())
x = n % k
print(min(x, k-x))
# Judge status: Accepted
s1, s2, s3 = input().split()

print(s1[0:1]+s2[0:1]+s3[0:1])
# Judge status: Accepted
N,M = map(int, input().split())
if M-2*N < 0:
    ret = M//2
else:
    M = M-2*N
    ret = N
    ret += M//4
    
print(ret)
# Judge status: Accepted
x,y=map(int,input().split())
X=abs(x)
Y=abs(y)

if y>=x>=0 or 0>=y>=x:
    print(abs(y-x))
elif x>y>0 or 0>x>y:
    print(x-y+2)
else:
    print(abs(X-Y)+1)
# Judge status: Wrong Answer
arg=input()
ans=[]
for char in arg:
  if char=='1' or char=='0':
    ans.append(char)
    print(ans)
  elif char=='B':
    if ans!=[]:
      del ans[-1]
      print(ans)
print(''.join(ans))
# Judge status: Accepted
def myfunc():
    N = int(input())

    counter = 0
    for i in range(N):
        A, B = map(int, input().split())
        if A == B:
            counter += 1
            if counter >= 3:
                print('Yes')
                return 0
        else:
            counter = 0
    print('No')

if __name__ == "__main__":
    myfunc()
# Judge status: Accepted
a,b,c = map(int,input().split())
flag = False
for i in range(a):
    tmp = b*i + c
    if tmp%a == 0:
        flag = True
        break
if flag:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n = int(input())
a = list(int(input()) for _ in range(n))
i= 1
cnt=0

for cnt in range(1, n+1):
    i = a[i-1]
    if(i == 2):
        print(cnt)
        quit()

print(-1)
# Judge status: Wrong Answer
n = int(input())

aa = 0
bb = 0
cc = 0 

for i in range(n):
    a,b,c = map(int,input().split())
    aa,bb,cc = max(bb + a, cc + a),max(aa + b, cc + b),max(aa + c, bb + c)

    print(aa,bb,cc)
print(max(aa,bb,cc))
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
i=1
ans=0
for x in A:
  if x==i:
    i += 1
  else:
    ans += 1
if ans==N:
  ans=-1
print(ans)
# Judge status: Accepted
n = int(input())
max = 1
for i in range(1,n+1):
  max = (max*i) % 1000000007
print(max)
# Judge status: Accepted
s=input()
v=input()
print("YES"if s[0]==v[2] and s[1]==v[1] and s[2]==v[0] else"NO")
# Judge status: Wrong Answer
a,b = map(int, input().split())

if (b+a)<=24:
    print(b+a)
else:
    print((b+a)-24)
# Judge status: Wrong Answer
N, M = [int(i) for i in input().split(" ")]

lst = []

for i in range(0,M):
	lst.extend(input().split(" "))
    
print(lst)

for i in range(1,N+1):
	print(lst.count("{}".format(i)))
# Judge status: Wrong Answer
N,A,B=map(int,input().split())
S=input()
cnt_a=0
cnt_b=0
for i in range(N):
    if S[i]=='a':
        cnt_a+=1
        if cnt_a+cnt_b<A+B:
            print('Yes')
        else:
            print('No')
    elif S[i]=='b':
        cnt_b+=1
        if cnt_a+cnt_b<A+B and cnt_b<=B:
            print('Yes') 
        else:
            print('No')
    else:
        print('No')
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if k < e - a:
  print('(:')
else:
  print('Yay!')
# Judge status: Accepted
#累積和的な

n,q = map(int,input().split())
s = input() + 'A' 
li = [0]*(n+1)

for i in range(n):
  li[i+1] = li[i] + (1 if s[i] + s[i+1] == 'AC' else 0)
  

for j in range(q):
  l,r = map(int,input().split())
  print(li[r-1] - li[l-1])
# Judge status: Accepted
def abc048():
    d=[]
    a=input()
    b=a.split()
    c=[i for i in b]
    k=''.join(c)
    for i in k:
        d.append(i)

    print(d[0],end='')
    print(d[len(c[0])],end='')
    print('C',end='')
    


abc048()
# Judge status: Wrong Answer
def main():
    N = int(input())
    A = list()

    for i in range(N):
        a, b = map(int, input().split())
        A.append([a, b])

    A.reverse()
    ans = 0
    offset = 0

    for pair in A:
        a, b = pair

        if b == 1:
                continue
        else:
            n = b - ((a + offset) % b)
            ans += n
            offset += n
    
    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
l = list(map(int, input().split()))

if len(set(l)) < 3:
    print("0")
    exit()

result = []
for i in range(len(l)):
  for j in range(i + 1, len(l)):
    for k in range(j + 1, len(l)):
        if l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
            if l[i] + l[j] > l[k] and l[j] + l[k] > l[i] and l[k] + l[i] > l[j]:
                result.append([l[i], l[j], l[k]])
print(len(result))
# Judge status: Accepted
a, b, c, k = map(int, input().split())

if a >= k:
    print(k)
    exit()

if k-a-b <= 0:
    print(a)
    exit()

print(a-(k-a-b))
# Judge status: Accepted
# -*- coding: utf-8 -*-

a,b = list(map(int, input().rstrip().split()))
#-----

n = b-a-1
x1 = n*(n+1)/2 - a
#x2 = (n+1)*(n+2)/2 - b

print( int(x1) )
# Judge status: Accepted
N=int(input())
S=list(input())

M=0
for i in range(1,N):
    M=max(M,len(set(S[:i])&set(S[i:])))
print(M)
# Judge status: Accepted
s=str(input())
br1=0
s=list(s)
s2=s
br2=0
for i in range(len(s)):
    if i%2==0:
        if s[i]=='0':
            br1+=1
    else:
        if s[i]=='1':
            br1+=1

for i in range(len(s)):
    if i%2==1:
        if s[i]=='0':
            br2+=1
    else:
        if s[i]=='1':
            br2+=1
print(min(br1,br2))
# Judge status: Accepted
S = input()
T = input()

ans = 0
for i in range(len(S)):
    if S[i] != T[i]:
        ans += 1

print(ans)
# Judge status: Accepted
import sys
n=int(input())
l=n//100
d=n%100
for i in range(5, 0, -1):
  if d // i > 0:
    l = l - (d // i)
    d = d - i * (d // i)
  if d == 0 and l >= 0:
    print(1)
    sys.exit()
  if l < 0:
    break
print(0)
# Judge status: Wrong Answer
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())

    ans=0
    i=1
    while ans<=n:
        ans+=i
        i+=1
    i-=1
    tot=0
    while True:
        if tot<n:
            print(i)
            tot+=i
            i=n-i
        else:
            break



resolve()
# Judge status: Wrong Answer
from fractions import gcd
from math import gcd

def lcm(x,y):
    return (x * y) // gcd(x, y)


n,m = map(int, input().split())
al = list(map(int, input().split()))

a4_flag = False
a2_flag = False
for a in al:
    if a%4 == 0:
        a4_flag = True
    else:
        a2_flag = True

if a4_flag and a2_flag:
    print(0)
    exit()


curr_lcm = 1
for a in al:
    curr_lcm = lcm(curr_lcm, a//2)

lcm_cnt = m//curr_lcm
lcm_cnt = (lcm_cnt+2-1)//2

print(lcm_cnt)
# Judge status: Accepted
import sys
from functools import reduce

def gcd(a, b):
    while b:
        a, b = b, a % b
    return abs(a)

n, X, *x = map(int, sys.stdin.read().split())

def main():
    x.append(X)
    for i in range(n):
        x[i] -= x[i+1]
    x[-1] -= X
    
    return reduce(gcd, x)

if __name__ == '__main__':
    ans = main()
    print(ans)
# Judge status: Wrong Answer
def main():
    n = int(input())
    al = []
    bl = []
    for _ in range(n):
        a, b = map(int, input().split())
        al.append(a)
        bl.append(b)
    if n%2:
        print(bl[n//2]-al[n//2]+1)
    else:
        print(bl[n//2]+bl[n//2-1]-al[n//2]-al[n//2-1]+1)

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n,k=map(int,input().split())
t = int(n/k)
tt = t + 1
ans=min([n - t*k,tt*k - n])
print(str(ans))
# Judge status: Wrong Answer
S = input()
while True :
  if S[0:7] == "dreamer":
    S = S.replace("dreamer","")
  elif S[0:6] == "eraser":
    S = S.replace("eraser","")
  elif S[0:5] == "dream":
    S = S.replace("dream","")
  elif S[0:5] == "erase":
    S = S.replace("erase","")
  elif len(S) == 0:
    print("YES")
    break
  else:
    print("NO")
    break
# Judge status: Accepted
import collections

N = int(input())
A = list(map(int,input().split()))
a = collections.Counter(A)
v = a.values()
l_v = list(v)

#合計
s = 0
for i in range(len(l_v)):
    n = l_v[i]-1
    s += n*(n+1)//2
#カウント
for i in range(N):
    print(s-(a[A[i]]-1))
# Judge status: Wrong Answer
import numpy as np

vol = 0
vol_max = 0
L = int(input())

for i in np.arange(1.0,L,0.1):
    for j in np.arange(1.0,i + 0.1,0.1):
        k = L - i - j
        vol = i*j*k
        if vol > vol_max and k > 0:
            #print("i,j,k", "=", i,j,k,"vol = ",vol,"vol_max = ",vol_max)
            vol_max = vol      

print(vol_max)
# Judge status: Wrong Answer
l=int(input())
n=0
while l>n*(n+1):
    n=n+1
if (l-n*(n+1)//2)==0:
    print(n)
else:
    print(l-n*(n+1)//2)
# Judge status: Accepted
N,M = map(int, input().split())

ans = set([0])
cnt = [1] * N
for _ in range(M):
    x,y = [int(i) - 1 for i in input().split()]
    cnt[x] -= 1
    cnt[y] += 1

    if x in ans:
        if cnt[x] == 0:
            ans.remove(x)
        ans.add(y)

print(len(ans))
# Judge status: Accepted
if __name__ == '__main__':
  haiku = input()
  if haiku.count('5') == 2 and haiku.count('7') == 1:
    print('YES')
  else:
    print('NO')
# Judge status: Wrong Answer
a=input().split(" ")
b=input().split(" ")
c=len(a)
d=0
e=0
for i in range(int(c)):
    if a[i]==b[i]:
        d=d+1
    else:
        e=e+1

print(e)
# Judge status: Accepted
A,B=map(int, input().split())
print(A+B) if (A+B) < 24 else print(A+B-24)
# Judge status: Accepted
N,K=list(map(int, input().split()))
h=list(map(int, input().split()))
 
 
dp=[0]+[float("inf")]*(N-1)
 
 
for i in range(N-1):
    for j in range(i,i+K):
        if j+1>N-1:
            break
        dp[j+1]=min(abs(h[j+1]-h[i])+dp[i],dp[j+1])
    
 
print(dp[-1])
# Judge status: Accepted
s = input()
if s == 'RRS' or s == 'SRR':
    print(2)
elif s == 'RRR':
    print(3)
elif s == 'SSS':
    print(0)
else:
    print(1)
# Judge status: Wrong Answer
n=int(input())
s=input()
if n%2!=0:
    print("No")
else:
    if s[:n//2+1]==s[n//2:]:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
n = int(input())
k = 1000000007
if n == 1:
  print(0)
  
else:
  print((10**n - 2* 9**n+8**n)%k)
# Judge status: Wrong Answer
A, B = map(int, input().split())

ans = 0

while A!=B :
  if str(A)==str(A)[::-1]:
    ans = ans + 1
  else:
    ans = ans
  A = A + 1

print(ans)
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))
kisu = 0
gusu = 0
num_4 = 0

for i in range(N):
    if a[i] % 2 == 1:
        kisu += 1
    elif a[i] % 4 == 0:
        num_4 += 1
    else:
        gusu += 1
if gusu != 0:
    kisu += 1

print('Yes' if kisu <= num_4+1 else 'No')
# Judge status: Accepted
N,M = list(map(int,input().split()))
PY = []
for i in range(M):
    PY.append(list(map(int,input().split())) + [i])

PY.sort(key=lambda x:x[1],reverse=False)

KEN = [0]*N
SHIs = []

for i in range(M):
    P = PY[i][0]
    ind = PY[i][2]
    KEN[P-1] += 1
    X = KEN[P-1]
    S = str(P).zfill(6) + str(X).zfill(6)
    SHIs.append([S,ind])

SHIs.sort(key=lambda x:x[1],reverse=False)
for s in SHIs:
    print(s[0])
# Judge status: Accepted
n=input()

flag=False

for i in range(1,len(n)-1):
    if n[i-1] == n[i] and n[i] == n[i+1]:
        flag=True
        break

if flag:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,m=map(int,input().split())
res=[0 for i in range(m+1)]
for i in range(n):
    ka=list(map(int,input().split()))
    for j in range(ka[0]):
        res[ka[j+1]]+=1
ans=0
for i in range(m):
    if res[i+1]==n:
        ans+=1
print(ans)
# Judge status: Accepted
args = [input() for _ in range(2)]

N = int(args[0])
H = [int(l) for l in args[1].split()]

max_len = 0
val = H[0]
st = 0
for i in range(1, N):
  next_val = H[i]
  if val < next_val:
    max_len = max(max_len, i - st - 1)
    st = i
    if st + max_len >= N:
      break
  val = next_val

if (N != 1) and (i == N - 1):
  max_len = max(max_len, N - 1 - st)
  
print(max_len)
# Judge status: Accepted
X = int(input())
tab = set([1])
for i in range(1,X+1):
    for j in range(2,X+1):
        if i**j <= X:
            tab.add(i**j)
        else:
            break
print(max([i for i in tab]))
# Judge status: Wrong Answer
a,b,c=input().split()
if(int(a)<=100 and int(b)<=100 and int(c)<=100 and int(a)>=1 and int(b)>=1 and int(c)>=1):
    if(abs(int(b)-int(a)) == abs(int(c)-int(b))):
        print("YES")
    else:
        print("NO")