Harryxun/stf_run huggingface dataset:
n=int(input())
s=list(map(int,input().split()))
x=0
for i in range(0,n-1):
  if s[i]=s[i+1]:
    x+=1
print(n-x)

### FIXED CODE ###

n=int(input())
s=input()
x=0
for i in range(0,n-1):
  if s[i]==s[i+1]:
    x+=1
print(n-x)
import itertools
n=int(input())
a=[]
for i in range(n):
    a.append(i+1)
b=[]
for per in itertools.permutatiton(a):
    b.append(list(per))
c=b.index(list(map(int,input().split())))
d=b.index(list(map(int,input().split())))
print(abs(c-d))

### FIXED CODE ###

import itertools
n=int(input())
a=[]
for i in range(n):
    a.append(i+1)
b=[]
for per in itertools.permutations(a):
    b.append(list(per))
c=b.index(list(map(int,input().split())))
d=b.index(list(map(int,input().split())))
print(abs(c-d))
h,w = (int(i) for i in input().split())
a[]
for i in range(h):
  a.append(input())
print('#'*(w+2))
for i in range(h):
  print('#'+ a[i] + '#')
print('#'*(w+2))

### FIXED CODE ###

h,w = (int(i) for i in input().split())
a=[ ]
for i in range(h):
  a.append(input())
print('#'*(w+2))
for i in range(h):
  print('#'+ a[i] + '#')
print('#'*(w+2))
def plus_and_check(list):
    sum_up = 0
    for i in range(len(list)-1):
        sum_up += list[i]
    


l = map(int, raw_input().split())
print "%d" % plus_and_check(l)

### FIXED CODE ###

import sys

a = []
answer_array = []
for line in sys.stdin:
    a.append(map(int, line.strip().split()))
    #except StopIteration:
        #break

for i in range(len(a)):
    sum_up = a[i][0] + a[i][1]

    answer = len(str(sum_up))

    answer_array.append(answer)

for j in range(len(answer_array)):
    print answer_array[j]
A, B, K = map(int, input().split())

list=[]
list= [i for i in range(1,10000) if A%i==0 and B%i==0]
a = list[K-1]
ptint(a)

### FIXED CODE ###

A,B,K = map(int, input().split())

list=[]
for i in range(1,10000):
    if (A%i==0 and B%i==0):
        list.append(i)
    else:
        continue

print(list[-K])
#!/usr/bin/env python3
import sys
 
 
def solve(N: int, Q: int, S: "List[int]", T: "List[int]", X: "List[int]", D: "List[int]"):
    def bsearch_l(val, D):
        l = -1
        r = Q - 1
        while r - l > 1:
            m = (l + r) // 2
            #print(val, l, r, m)
            if val > m:
                l = m
            else:
                r = m
        #print(val, l, r)
        return r
    def bsearch_r(val, D):
        l = 0
        r = Q
        while r - l > 1:
            m = (l + r) // 2
            #print(val, l, r, m)
            if val < D[m]:
                r = m
            else:
                l = m
        #print(val, l, r)
        return l
    a = []
    for i in range(N):
        a.append([X[i], max(0, -(X[i] - S[i]) - 1), max(0, -(X[i] - T[i]) - 1)])
    a.sort(key=lambda x: x[0])
    ret = [-1] * Q
    for tmp in a:
        l = bsearch_l(tmp[1], D)
        r = bsearch_r(tmp[2], D)
        #print(tmp)
        #print(l, r)
        for i in range(l, r + 1):
            if i >= 0 and i < Q and ret[i] < 0:
                ret[i] = tmp[0]
 
    for r in ret:
        print(r)
    return
 
 
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    S = [int()] * (N)  # type: "List[int]" 
    T = [int()] * (N)  # type: "List[int]" 
    X = [int()] * (N)  # type: "List[int]" 
    for i in range(N):
        S[i] = int(next(tokens))
        T[i] = int(next(tokens))
        X[i] = int(next(tokens))
    D = [ int(next(tokens)) for _ in range(Q) ]  # type: "List[int]"
    solve(N, Q, S, T, X, D)
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(A: int, P: int):
    ret = (3 * A + P) // 2
    print(ret)
    return


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
    P = int(next(tokens))  # type: int
    solve(A, P)

if __name__ == '__main__':
    main()
n=int(input())
b=list(map(int,input().split()))
l=len(b)
a=[]
f=0
for _ in range(n):
  for i in range(l-1,-1,-1):
    if b[i]==i+1:
      a.append(b.pop(i))
      break
    if i==0:
      f=1
if f==0:
  for i in range(l-1,-1,-1):
    print(a[i])
else:
  print(-1)

### FIXED CODE ###

n=int(input())
b=list(map(int,input().split()))
a=[]
f=0
for _ in range(n):
  for i in range(len(b)-1,-1,-1):
    if b[i]==i+1:
      a.append(b.pop(i))
      break
    if i==0:
      f=1
if f==0:
  for i in range(n-1,-1,-1):
    print(a[i])
else:
  print(-1)
print((2*input()-2)//11+1)

### FIXED CODE ###

print((2*int(input())-2)//11+1)
x = input().split()
a = (nums[0])
b = (nums[1])
print(a*b,(a+b)*2)

### FIXED CODE ###

a,b=map(int,input().split())
print(a*b,(a+b)*2)
n, k = map(int, input().split())
p = list(map(int, input().split()))
p3_before = (sum(p[:k])+k)/2
for i in range(1, n-k):
    p3 =  (sum(p[(i):(k+i)])+k)/2
    ans = max([p3_before, p3])
    p3_before = p3
print(p3)

### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))
tmp = sum(p[:k])
ans = [tmp]
if n == k:
    ans_mae = ans[0]
    print((ans_mae+k)/2)
else:
    for i in range(1,n-k+1):
        tmp = tmp - p[i-1] + p[i+k-1]
        ans.append(tmp)
    print((max(ans)+k)/2)
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**10)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n,m = na()
s = na()
t = na()
mod = 10**9+7

dp = [[0 for i in range(n + 1)] for i in range(m + 1)]

for i in range(1, n+1):
    for j in range(1, m+1):
        if (s[i-1] == t[j-1]):
            dp[i][j] = (1 + dp[i][j-1] + dp[i-1][j])%mod
        else:
            dp[i][j] = (dp[i][j-1] + dp[i-1][j] - dp[i-1][j-1])%mod
  
print((dp[n][m]+1)%mod)

### FIXED CODE ###

import sys
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n,m = na()
s = na()
t = na()
mod = 10**9+7

dp = [[0 for i in range(m + 1)] for j in range(n + 1)]

for i in range(1, n+1):
    for j in range(1, m+1):
        if (s[i-1] == t[j-1]):
            dp[i][j] = (1 + dp[i][j-1] + dp[i-1][j])%mod
        else:
            dp[i][j] = (dp[i][j-1] + dp[i-1][j] - dp[i-1][j-1])%mod
  
print((dp[n][m]+1)%mod)
import numpy as np
N = int(input())
a = list(map(float, input().split(" ")))
b = list(map(float, input().split(" ")))
c = list(map(float, input().split(" ")))

sort(a)
sort(c)

def binary_insert_right(li, v):
    upper = len(li)
    lower = 0
    while upper > lower:
        mid = ( upper + lower ) // 2
        if v < li[mid]:
            upper = mid
        else:
            lower = mid - 1
    return mid

num = 0
for i in range(N):
    num += binary_insert_right(a, b[i]) * ( len(c) - binary_insert_right(c, b[i]) - 1 )
print(num)

### FIXED CODE ###

N = int(input())
a = list(map(float, input().split(" ")))
b = list(map(float, input().split(" ")))
c = list(map(float, input().split(" ")))

a.sort()
c.sort()


def bisect_left(a, x, lo=0, hi=None):
    """Return the index where to insert item x in list a, assuming a is sorted.
    The return value i is such that all e in a[:i] have e < x, and all e in
    a[i:] have e >= x.  So if x already appears in the list, a.insert(x) will
    insert just before the leftmost x already there.
    Optional args lo (default 0) and hi (default len(a)) bound the
    slice of a to be searched.
    """

    if lo < 0:
        raise ValueError('lo must be non-negative')
    if hi is None:
        hi = len(a)
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x: lo = mid+1
        else: hi = mid
    return lo

def bisect_right(a, x, lo=0, hi=None):
    """Return the index where to insert item x in list a, assuming a is sorted.
    The return value i is such that all e in a[:i] have e <= x, and all e in
    a[i:] have e > x.  So if x already appears in the list, a.insert(x) will
    insert just after the rightmost x already there.
    Optional args lo (default 0) and hi (default len(a)) bound the
    slice of a to be searched.
    """

    if lo < 0:
        raise ValueError('lo must be non-negative')
    if hi is None:
        hi = len(a)
    while lo < hi:
        mid = (lo+hi)//2
        if x < a[mid]: hi = mid
        else: lo = mid+1
    return lo

num = 0
for i in range(N):
    num += (bisect_left(a, b[i])) * (len(c) - bisect_right(c, b[i]))
print(num)
a = int(input())
b = int(input())
print(a * b - a - b + 1)

### FIXED CODE ###

a,b = list(map(int,input().split()))
print(a * b - a - b + 1)
a,b = map(in,input().split())
print(a-b+1)

### FIXED CODE ###

a,b = map(int,input().split())
print(a-b+1)
a, b = input()
num_a = int(a)
num_b = int(b)
dif = num_a >= num_b*2
if dif >= 0:
  print(dif)
else:
  print(0)


### FIXED CODE ###

a, b = input().split()
num_a = int(a)
num_b = int(b)
dif = num_a - num_b*2
if dif >= 0:
  print(dif)
else:
  print(0)
def comp(a, b):
  if a < b:
    print a '<' b
  if a > b:
    print a '>' b
  print a '==' b

### FIXED CODE ###

a, b = map(int, raw_input().split())

if a < b:
    print 'a < b'
elif a > b:
    print 'a > b'
else:
    print 'a == b'
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

N, Q = map(int, input().split())
info = [[] for _ in range(N)]
sum = [0 for _ in range(N)]

for _ in range(N - 1):
    a, b = map(int, input().split())
    info[a - 1].append(b - 1)


def plus(n, val):
    sum[n] += val
    for i in info[n]:
        plus(i, val)


for _ in range(Q):
    p, x = map(int, input().split())
    plus(p - 1, x)
for i in range(N):
    sum[i] = str(sum[i])
print(" ".join(sum))


### FIXED CODE ###

import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

sys.setrecursionlimit(10 ** 6)
MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

N, Q = map(int, input().split())
info = [[] for _ in range(N)]
ans = [0 for _ in range(N)]
check = [1 for _ in range(N)]

for _ in range(N - 1):
    a, b = map(int, input().split())
    info[a - 1].append(b - 1)
    info[b - 1].append(a - 1)


def plus(n, val):
    ans[n] += val
    check[n] = 0
    for i in info[n]:
        if check[i]:
            plus(i, val + Query[i])


Query = [0 for _ in range(N)]
for _ in range(Q):
    p, x = map(int, input().split())
    Query[p - 1] += x
plus(0, Query[0])
ans = list(map(str, ans))
print(" ".join(ans))
n = input()
k = input()


if len(n) == 1:
  print(n)
else:
  if k == "1":
    print(n[0])
  else:
    for i  in range(max(int(k), len(n))):
      if n[i] != "1":
        print(n[i])
        exit
      else:
        print(1)

### FIXED CODE ###

n = input()
k = int(input())


for i in range(len(n)):
  if i == k-1 or i == len(n)-1:
    print(n[i])
    exit()
  else:
    if n[i] != "1":
      print(n[i])
      exit()
[N, K] = [int(i) for i in input().split()]
print(min(N%K, -N%K))

### FIXED CODE ###

import math
K = int(input())
ans = 0

for a in range(1, K+1):
    for b in range(a, K+1):
        for c in range(b, K+1):
            s = math.gcd(a, b)
            t = math.gcd(s, c)
            if a == c:
                ans += t
            elif (a == b or b == c) and a != c:
                ans += 3*t
            else:
                ans += 6*t
print(ans)
A=input()
if A='hi' or A='hihi' or A='hihihi' or A='hihihihi' or A='hihihihihi':
    print('Yes')
else:
    print('No')

### FIXED CODE ###

A=input()
if A=='hi' or A=='hihi' or A=='hihihi' or A=='hihihihi' or A=='hihihihihi':
    print('Yes')
else:
    print('No')
S=input()
list=[Sunny,Cloudy,Rainy]
print(list[S])

### FIXED CODE ###

S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)%3])
N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    x = i
    for j in range(2, i+1):
        while x%j == 0:
            x//=j
            n[j] += 1

def num(m):
return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

### FIXED CODE ###

N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)
n = int(input())
price = n *25 / 27
p = price.is_integer()
if p = True:
    print(price // 1)
else:
    print(":(")

### FIXED CODE ###

n = int(input())
for i in range(50000):
    if int(i*1.08) == n:
        print(i)
        exit()
print(":(")
n = int(input())
a = list(map(int,input().split()))
b = []

for x in a :
  b.append(1/x)
  
c = sum(b)
ans = 1/c
print(ans)
  

### FIXED CODE ###

n = int(input())
a = input()
print(a if n >= 3200 else "red")
N = int(input())
a = [int(i) for i in input().split()]
rank = [0]*9
ans = [0]*2
for i in range(len(a)):
    if a[i] < 400:
        rank[0] = 1
    elif a[i] < 800:
        rank[1] = 1
    elif a[i] < 1200:
        rank[2] = 1
    elif a[i] < 1600:
        rank[3] = 1
    elif a[i] < 2000:
        rank[4] = 1
    elif a[i] < 2400:
        rank[5] = 1
    elif a[i] < 2800:
        rank[6] = 1
    elif a[i] < 3200:
        rank[7] = 1
    else:
        rank[8] += 1
ans[0] = sum(rank)
if 8 < ans[0]:
    ans[0] = 8
if rank[9] != 0 and (sum(rank[0:8])) == 0:
    ans[1] = 1
else:
    ans[1] = sum(rank[0:8])

[print(ans[i], end=' ') for i in reversed(range(len(ans)))]


### FIXED CODE ###

N = int(input())
a = [int(i) for i in input().split()]
rank = [0]*9
ans = [0]*2
for i in range(len(a)):
    if a[i] < 400:
        rank[0] = 1
    elif a[i] < 800:
        rank[1] = 1
    elif a[i] < 1200:
        rank[2] = 1
    elif a[i] < 1600:
        rank[3] = 1
    elif a[i] < 2000:
        rank[4] = 1
    elif a[i] < 2400:
        rank[5] = 1
    elif a[i] < 2800:
        rank[6] = 1
    elif a[i] < 3200:
        rank[7] = 1
    else:
        rank[8] += 1
ans[0] = sum(rank)

if sum(rank[:8]) == 0:
    ans[1] = 1
else:
    ans[1] = sum(rank[:8])

[print(ans[i], end=' ') for i in reversed(range(len(ans)))]
s = input()
list_s = list(s)
k = 0
ans = []
for i in range(len(list_s)):
    c = list_s[i]
    if c == "A" or c == "C" or c == "G" or c == "T":
        k += 1
    else:
        ans.append(k)
        k = 0

print(max(ans))

### FIXED CODE ###

s = input()
list_s = list(s)
k = 0
ans = []
for i in range(len(list_s)):
    c = list_s[i]
    if c == "A" or c == "C" or c == "G" or c == "T":
        k += 1
    else:
        ans.append(k)
        k = 0
if k != 0:
    ans.append(k)
print(max(ans))
a,b,c = list(map(str,input()))
a,b,c = map(str.upper())
print( a[0] + b[0] + c[0])

### FIXED CODE ###

s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])
n,m=map(int,input().split())
x = [list(map(int, input().split())) for _ in range(n)]
from itertools import *
res = 0
for a in product([-1, 1], [-1, 1], [-1, 1]):
    ts =[]
    for t in x:
        ta = 0
        for i,j in zip(a,t):
            ta+=i*j
        ts.append(t)
    s = sum(sorted(ts,reverse=True)[:m])
    res = max(res, s)
print(res)

### FIXED CODE ###

n,m=map(int,input().split())
x = [tuple(map(int, input().split())) for _ in range(n)]
from itertools import *
res = 0
for a in product([-1, 1], [-1, 1], [-1, 1]):
    ts = (sum(i*j for i,j in zip(a,t)) for t in x)
    s = sum(sorted(ts,reverse=True)[:m])
    res = max(res, s)
print(res)
S = input()

print('Yes' if all(S.count(s) == 2 for s in input()) else 'No')


### FIXED CODE ###

S = input()

print('Yes' if all(S.count(s) == 2 for s in S) else 'No')
N, X=map(int, input().split())
L=list(map(int, input().split()))

l=0
counter=0
while l<=X:
  l+=L[counter-1]
  counter+=1

### FIXED CODE ###

import numpy as np

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

N=temp[0]
X=temp[1]

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

ind=1
while np.sum(L[:ind])<=X and ind<=N:
  ind+=1
  
print(ind)
A, B = map(int, input().split())
prime1 = get_prime(A)
prime2 = get_prime(B)
ans_prime = prime1 & prime2
print(len(ans_prime) + 1)

def get_prime(n):
    prime = []
    while n % 2 == 0:
        prime.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            prime.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        prime.append(n)
    return prime

### FIXED CODE ###

def get_prime(n):
    prime = []
    while n % 2 == 0:
        prime.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            prime.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        prime.append(n)
    return prime

A, B = map(int, input().split())
prime1 = get_prime(A)
prime2 = get_prime(B)
ans_prime = set(prime1) & set(prime2)
print(len(ans_prime) + 1)
n,k = map(int,input().split())
a = list(map(int,input().split()))
b = [0]*(n+2)
S=sum(a)
for i in range(k):
    s=S
    S=0
    for j in range(n):
        if j<a[j]:
            b[0]+=1
        else:
            b[j-a[j]+1]+=1
        if n-1-j<a[j]:
            b[n+1]-=1
        else:
            b[j+a[j]+2]-=1
    for j in range(n):
        if j==0:
            a[j] = b[j]+b[j+1]
        else:
            a[j] = a[j-1]+b[j+1]
        b[j]=0
        S+=a[j]
    b[-2]=0
    b[-1]=0
    if S==s:
        break
for i in a:
    print(i,end=" ")

### FIXED CODE ###

s=input()
print(s[:3])
import sys

def main():
    arg = sys.argv
    T = int(arg[1])
    X = int(arg[2])
    t = T / X
    print(t)


if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys

def main():
    arg = sys.stdin.readline().rstrip().split()
    T = int(arg[0])
    X = int(arg[1])
    t = T / X
    print(t)


if __name__ == "__main__":
    main()
from bisect import bisect_left

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

ans = 0

for ai in range(N):
    bi = bisect_left(B, A[ai])
    ci = bisect_left(C, B[bi])
    ans += (N-bi)*(N-ci)

print(ans)


### FIXED CODE ###

from bisect import bisect_right, bisect_left

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

ans = 0

for bi in range(N):
    ai_max = bisect_left(A, B[bi])
    ci_min = bisect_right(C, B[bi])
    ans += (ai_max) * (N - ci_min)

print(ans)
s = input()
q = int(input())
add_head = ""
add_tail = ""

for _ in range(q):
    query = input().split()
    if query[0] == "1":
        add_head, add_tail = add_tail,add_head
    else:
        if query[1] == "1":
            add_head = query[2] + add_head
        else:
            add_tail = add_tail + query[2]
                
print(add_head[::-1] + s + add_tail)

### FIXED CODE ###

s = input()
if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")
import collections

N = int(input())
A = list(map(int, input().split()))
 
for i in range(len(A)):
  if i==0:
    A_temp = A[1:]
  elif i==len(A)-1:
    A_temp = A[0:len(A)-1]
  else:
    A_temp = A[:i] + A[i+1:] 
  c = collections.Counter(A_temp)
  
  co = 0
  for k in c.values():
    if k != 1 and k != 0:
      Mcon = int(k*(k-1)/2)
      co += Mcon
  print(co)

### FIXED CODE ###

from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0 or N == 1:
  if M!=1:
    print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  if N!=1:
    print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)
N = int(input())
S = input()
K = input()
t = S[K-1]
ans = ''
for s in S:
  if s == t:
    ans += s
  else:
    ans += '*'

print(ans)

### FIXED CODE ###

N = int(input())
S = input()
K = int(input())
t = S[K-1]
ans = ''
for s in S:
  if s == t:
    ans += s
  else:
    ans += '*'

print(ans)
N = int(input())
a = [list(map(int, input().split())) for i in range(N)]
flag = 0
 
if N >1: 
  for i in range(N-1):
    dt = a[i+1][0]-a[i][0]
    dist = abs(a[i+1][1]-a[i][1])+abs(a[i+1][2]-a[i][2])
    if dt < dist:
      flag = flag +1
    if dt % 2 != dist % 2:
      flag = flag +1
else:
  dt = a[0]
  dist = abs(a[1])+abs(a[2])
  if dt < dist:
      flag = flag +1
  if dt % 2 != dist % 2:
      flag = flag +1
    
print('Yes' if flag == 0 else 'No')   

### FIXED CODE ###

n = int(input())
t=[0]
x=[0]
y=[0]
for i in range(n):
    _t, _x, _y = map(int, input().split())
    t.append(_t)
    x.append(_x)
    y.append(_y)

flag = 0
for i in range(1,n+1):
    dt = t[i] - t[i-1]
    dx = x[i] - x[i-1]
    dy = y[i] - y[i-1]
    dist = abs(dx) + abs(dy)
    if dist > dt:
        flag = flag +1
    elif dist % 2 != dt % 2:
        flag = flag +1
else:
    print("Yes" if flag ==0 else "No")
x, a, b = map(int, input().split())

answer = (x-a) % b

print(answer)

### FIXED CODE ###

X = int(input())
A = int(input())
B = int(input())

print((X - A) % B)
import sys

N, K = map(int, input().split())
candles = list(map(int, input().split()))

tmp = sys.maxsize

for i in range(K):
    minNum = candles[i]
    maxNum = candles[i+K]
    if maxNum < 0:
        ans = minNum
    elif (minNum < 0) and (0 <= maxNum):
        if abs(minNum) <= abs(maxNum):
            ans = 2*abs(minNum) + maxNum
        else:
            ans = 2*maxNum + abs(minNum)
    elif 0 <= minNum:
        ans = maxNum
    tmp = min(tmp,ans)

print(tmp)

### FIXED CODE ###

import sys

N, K = map(int, input().split())
candles = list(map(int, input().split()))

ans = sys.maxsize

for i in range(N-K+1):
    minNum = candles[i]
    maxNum = candles[i+K-1]
    l = abs(minNum) + abs(minNum - maxNum)
    r = abs(maxNum) + abs(maxNum - minNum)
    ans = min(ans, min(l, r))

print(ans)
n,q = map(int,input().split())
s = list(input())

start_list = [0]*(n)
end_list = [0]*(n+1)

num = 0
for i in range(n):
    if s[i] == "A" and s[i+1] == "C":
        num += 1
    start_list[i] = num
    end_list[i+1] = num
start_list.insert(0,0)

for i in range(q):
    l,r = map(int,input().split())
    print(end_list[r-1] - start_list[l-1])


### FIXED CODE ###

n,q = map(int,input().split())
s = list(input())

count = [0]*n

num = 0
for i in range(n-1):
    if s[i] == "A" and s[i+1] == "C":
        num += 1
    count[i] = num
count.insert(0,0)
count[-1] = count[-2]

for i in range(q):
    l,r = map(int,input().split())
    print(count[r-1] - count[l-1])
h, w = map(int,input().split())
n = int(input())
a = list(map(int,input().split()))

### FIXED CODE ###

# one -> four
# two -> two, four
# four -> one, two, four

n = int(input())
one = 0
two = 0
four = 0

for a in map(int,input().split()):
    if a%2 != 0: one+= 1
    elif a%4 != 0: two+= 1
    else: four+= 1

def no():
    print("No")
    exit()

if two == 0:
    #1414141
    print("Yes" if four >= one-1 else "No")
else:
    #222222241414141
    print("Yes" if four >= one else "No")
import numpy as np

n = int(input())
X = np.array([input().split() for _ in range(n)], np.int64)
dp = np.zeros((n + 1, 3), np.int64)
dp[0, 0] = dp[0, 1] = dp[0, 2] = 0
for i in range(n):
    for j in range(3):
        dp[i + 1, j] = X[i, j] + max(dp[i, k] for k in range(3) if j != k)
print(max(dp[n]))

### FIXED CODE ###

import numpy as np

n = int(input())
X = np.array([input().split() for _ in range(n)], np.int64)
dp = np.zeros((n + 1, 3), np.int64)
dp[0, 0] = dp[0, 1] = dp[0, 2] = 0
for i in range(n):
    for j in range(3):
        dp[i + 1, j] = X[i, j] + max(dp[i, k] for k in range(3) if j != k)
print(max(dp[n]))
a, b, c = int(input())

if (a + b + c) == 17:
  print("YES")
else:
  print("NO")



### FIXED CODE ###

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

if (a + b + c) == 17:
  print("YES")
else:
  print("NO")