Harryxun/stf_run huggingface dataset:
S = input()
#print(len(S))
dire = ['dream','dreamer','erase','eraser']
flag = 0
i=0
j=0

while True:

    tmp = dire[j]
    ind = i

    if ind + len(dire[j]) <=len(S)+1:
    #    print(j)
        for k in range(len(dire[j])):

            if S[ind] != tmp[k]:
                flag =0
                j += 1
                break
            else:
                ind = ind + 1
                if k==len(dire[j])-1:
                    i = i + len(dire[j])
                    flag = 1
                    old = len(dire[j])
                    old_j  = j
                    j=0

    if   j >= 4 and flag == 0 and i != 0:
        i = i - old
        j = old_j+1

    if i >= len(S)-1:
        print('YES')
        break
    elif i <= 0 and j >= 3 and flag == 0:
        print('NO')
        break


### FIXED CODE ###

S = input()
S_r = S[::-1]
dire = ['dream','dreamer','erase','eraser']
dire_r = [0]*4
for i in range(4):
    tmp = dire[i]
    dire_r[i] = tmp[::-1]
ind = 0

excep = 0

while ind  <len(S_r):
    if excep == 1:
        break
    flag2= 0
    for j in range(4):
        if flag2 ==0:
            case = 0
            for k in range(len(dire_r[j])):
                tmp = dire_r[j]

                if ind + k < len(S_r) and case == 0:
                #    print(j)
            #        print('S:'+S_r[ind+k])
            #        print('dire:'+tmp[k])
                    if S_r[ind+k] != tmp[k]:
                        flag = 0
                        case = 1
                        if j == 3:
                            excep = 1

                    elif k== len(dire_r[j])  -1:
                        ind = ind + len(dire_r[j])
                        flag = 1
                        case = 1
                        flag2 = 1


if flag == 1:
    print('YES')
else:
    print('NO')
a,b=list(map(float,input().split()))
import sys
for i in range(100000):
  if int(i*8/100)==a and int(i*10/100)==b:
    print(i)
    sys.exit()
print(-1)

  
  

### FIXED CODE ###

s=list(input())
if ("A" not in s) or ("B" not in s):
  print("No")
else:
  print("Yes")
s = input()
print(s.[::2])

### FIXED CODE ###

s = input()
print(s[::2])
def slove():
    import sys, heapq
    input = sys.stdin.readline
    n, k = list(map(int, input().rstrip('\n').split()))
    v = list(map(int, input().rstrip('\n').split()))
    ms = 0
    t = []
    heapq.heapify(t)
    for i in range(1, k + 1):
        for j in range(i + 1):
            t.clear()
            if j != 0:
                for w in v[:j]:
                    heapq.heappush(t, w)
            if -i+j != 0:
                for w in v[-i+j:]:
                    heapq.heappush(t, w)
            for _ in range(k-i):
                if len(t) != 0:
                    p = heapq.heappop(t)
                    if p >= 0:
                        heapq.heappush(t, p)
                        break
            ms = max(ms, sum(t))
    print(ms)


if __name__ == '__main__':
    slove()


### FIXED CODE ###

def slove():
    import sys, heapq
    input = sys.stdin.readline
    n, k = list(map(int, input().rstrip('\n').split()))
    v = list(map(int, input().rstrip('\n').split()))
    ms = 0
    for i in range(1, min(k + 1, len(v) + 1)):
        for j in range(i + 1):
            t = []
            heapq.heapify(t)
            if j != 0:
                for w in v[:j]:
                    heapq.heappush(t, w)
            if -i+j != 0:
                for w in v[-i+j:]:
                    heapq.heappush(t, w)
            for _ in range(k-i):
                if len(t) != 0:
                    p = heapq.heappop(t)
                    if p >= 0:
                        heapq.heappush(t, p)
                        break
                else:
                    break
            ms = max(ms, sum(t))
    print(ms)


if __name__ == '__main__':
    slove()
a,b = map(int,input().split())

if 0<a<10,0<b<10:
  print(a*b)
else:
  print(-1)

### FIXED CODE ###

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

if 0<a<10:
  if 0<b<10:
    print(a*b)
  else:
    print(-1)
else:
  print(-1)
vocab = {"A":"T","T":"A","C":"G","G","C"}
print(vocab[input()])

### FIXED CODE ###

vocab = {"A":"T","T":"A","C":"G","G":"C"}
print(vocab[input()])
H, W = map(int, input().split())
table = []
table.append(list("_" * (W + 2)))
for _ in range(H):
    table.append(list("_" + input() + "_"))
table.append(list("_" * (W + 2)))

for h in range(1, H + 1):
    for w in range(1, W + 1):
        if table[h][w] == "#":
            continue
        count = 0
        for _h in [-1, 0, +1]:
            for _w in [-1, 0, +1]:
                print(h + _h, w + _w)
                if table[h + _h][w + _w] == "#":
                    count += 1
        table[h][w] = str(count)

for h in range(1, H + 1):
    print("".join(table[h]).replace("_", ""))


### FIXED CODE ###

a, b, c = input().split(" ")

if a == b:
    print(c)
elif a == c:
    print(b)
else:
    print(a)
n = int(input())
if n % 2 == 0:
    print(n//2)
else:
    print(n//2)+1

### FIXED CODE ###

n = int(input())
if n % 2 == 0:
    print(n//2)
else:
    print(n//2+1)
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    a = [int(input()) for i in range(N)]

    check = [False] * (max(a) + 1)

    for i in a:
        check[i] = not(check[i])
    
    ans = 0
    for c in check:
        if c:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
import bisect
input = sys.stdin.readline

def main():
    N = int(input())
    a = [int(input()) for i in range(N)]

    nums = []

    for i in a:
        if len(nums) > 0:
            if i <= nums[-1]:
                ind = bisect.bisect_left(nums, i)
                if nums[ind] == i:
                    nums.pop(ind)
                else:
                    bisect.insort(nums, i)
            else:
                nums.append(i)
        else:
            nums.append(i)
    
    print(len(nums))


if __name__ == "__main__":
    main()
m, a, b = map(int, input().split())
n = list(str(m))

count = 0
for j in range(m):
    l = [n[i] for i in range(len(j))]
    sum = sum(l)
    if a <= sum and sum <= b:
        count += 1
print(count)


### FIXED CODE ###

m, a, b = map(int, input().split())

x = []
for j in range(1, m + 1):
    n = list(str(j))
    l = [int(n[i]) for i in range(len(n))]
    if len(l) == 1:
        l.append(0)
    s = sum(l)
    if a <= s and s <= b:
        x.append(j)
print(sum(x))
n=int(input())
v=sorted(list(map(float,input().split())))
x=-1
y=-1
z=10000
for k in range(n-1):
    for i in range(n-1):
        if v[i+1]-v[i] < z:
            x=i+1
            y=i
            z=v[i+1]-v[i]
    v[y]=(v[x]+v[y])/2
    del(v[x])
    v=sorted(v)
    n=len(v)
print(v[0])

### FIXED CODE ###

n=int(input())
v=sorted(list(map(float,input().split())))
z = v[0]
for i in range(1,n):
    z=(z+v[i])/2
print(z)
n = int(input())
a = list(map(int, input().split()))

next = a[0]
count = 1

for i in range(1,n):
    if next == 2:
        print(count)
        break
    next = a[next-1]
    count += 1
else:
    print(-1)

### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(n)]

next = a[0]
count = 1

for i in range(1,n):
    if next == 2:
        print(count)
        break
    next = a[next-1]
    count += 1
else:
    print(-1)
x = int(input)
if x == 0:
	print(1)
else:
  print(0)

### FIXED CODE ###

x = int(input())
if x == 0:
  print(1)
else:
  print(0)
#!/usr/bin/env python3
import sys
from math import factorial



MOD = 1000000007  # type: int


def cmb(n, r, p):
    return (factorial(n) // factorial(r) // factorial(n - r))

def solve(N: int, K: int):
    c = N-K+1
    print(c)
    for i in range(2,K+1):
        # i回の操作でとるために両端を除くセパレータの数はi-1個
        b = cmb(K-1, i-1, MOD)
        # 両端を含めたセパレータの数はi-1+2個
        # セパレータには最低1つ配属するので，配置する赤玉の数はN-K-(i-1)個
        # この赤玉をi+1個のセパレータに配属させる
        # i+1 H N-K-(i-1)
        if c-i<0:
            print(0)
        else:
            k = cmb(c, c-i, MOD)
        print(b*k%MOD)

    return


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

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
from math import factorial
MOD = 1000000007  # type: int

def cmb(n, r, p):
    return (factorial(n) // (factorial(r) * factorial(n - r))%p)

def solve(N: int, K: int):
    c = N-K

    for i in range(K):
        # i+1回の操作でとるために両端を除くセパレータの数はi個
        # 両端を含めたセパレータの数はi+2個
        # セパレータには最低1つ配属するので，配置する赤玉の数はN-K-i個
        # この赤玉をi+2個のセパレータに配属させる
        # i+2 H c-i
        if c-i<0:
            print(0)
        else:
            b = cmb(K-1, i, MOD)
            k = cmb(c+1, c-i, MOD)
            print(b*k%MOD)
    return


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

if __name__ == '__main__':
    main()
M = input()
D = input()

M, D = int(M), int(D)

# print("M:", M, "D:", D)

count = 0
# days = []

for m in range(1, M+1):
    for d in range(1, D+1):
        # print("m: ", m, " d: ", d, " d10: ", d/10, " d1", d%10)
        d1 = d % 10
        d10 = d // 10
        if (d1 * d10) == m and d1 != 1 and d10 != 1:
            # days.append("{}月{}日".format(m, d))
            count += 1

# for day in days:
#     print(day)
print(count)

### FIXED CODE ###

M, D = map(int, input().split())

# print("M:", M, "D:", D)

count = 0
# days = []

for m in range(1, M+1):
    for d in range(1, D+1):
        # print("m: ", m, " d: ", d, " d10: ", d/10, " d1", d%10)
        d1 = d % 10
        d10 = d // 10
        if (d1 * d10) == m and d1 != 1 and d10 != 1:
            # days.append("{}月{}日".format(m, d))
            count += 1

# for day in days:
#     print(day)
print(count)
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(math.sqrt(e)) + 1):
        for y in range(int(math.sqrt(e))+ 1):
            x = e - y**2-z**3
            if  x <0:break
            if m > x+y+z: m = x+y+z
    print(m)


### FIXED CODE ###

import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)
a,b = map(int, raw_input().split())
print "Odd" if a*b % 2 else "Even"

### FIXED CODE ###

a,b = map(int, input().split())
print("Odd" if a*b % 2 else "Even")
from collections import deque, defaultdict

N, M = map(int, input().split())
edge = defaultdict(list)
for i in range(M):
    a, b = map(int, input().split())
    edge[(a, 0)].append((b, 1))
    edge[(a, 1)].append((b, 2))
    edge[(a, 2)].append((b, 0))

S, T = map(int, input().split())

inf = float('inf')
dist = {}
for i in range(1, N+1):
    dist[(i, 0)] = inf
    dist[(i, 1)] = inf
    dist[(i, 2)] = inf
dist[(S, 0)] = 0

def BST(now, deq, dist):
    if(len(edge[now]) == 0):
        return
    for node in edge[now]:
        if(dist[node] < inf): continue
        dist[node] = dist[now] + 1
        deq.append(node)
    if(len(deq) > 0):
        next_node = deq.pop()
        BST(next_node, deq, dist)
    return

deq = deque()
BST((S, 0), deq, dist)

if(dist[(T, 0)] == inf):
    print(-1)
else:
    print(dist[(T, 0)]//3)



### FIXED CODE ###

from collections import deque, defaultdict

N, M = map(int, input().split())
edge = defaultdict(list)
for i in range(M):
    a, b = map(int, input().split())
    edge[(a, 0)].append((b, 1))
    edge[(a, 1)].append((b, 2))
    edge[(a, 2)].append((b, 0))

S, T = map(int, input().split())

inf = float('inf')
dist = {}
for i in range(1, N+1):
    dist[(i, 0)] = inf
    dist[(i, 1)] = inf
    dist[(i, 2)] = inf
dist[(S, 0)] = 0

dq = deque()
dq.append((S, 0))

while dq:
    v = dq.popleft()
    if v == (T, 0):
        break
    for u in edge[v]:
        if dist[u] < inf: continue
        dq.append(u)
        dist[u] = dist[v] + 1

if(dist[(T, 0)] == inf):
    print(-1)
else:
    print(dist[(T, 0)]//3)
n = int(input())
h = list(map(int,input().split()))
c = 0
for i in range(len(h)-2):
    if h[i+2]<h[i+1]<h[i] or h[i+1]-h[i] >= 3:
        print("No")
        c += 1
        break
        
if c == 0:
    if h[-1]-h[-2] >= 3:
        print("No")
    else:
        print("Yes")

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
c = 0
t = 0
for i in range(len(h)-2):
    if h[i+2]<h[i+1]<h[i] or h[i+1]-h[i] <= -2:
        print("No")
        c += 1
        break
    if h[i+1]<h[i]:
        t += 1
        if t == 2:
            print("No")
            c += 1
            break
    elif h[i+1]>h[i]:
        t = 0
    
            
if c == 0:
    if len(h)>=2:
        if h[-1]-h[-2] <= -2:
            print("No")
        else:
            print("Yes")
    else:
        print("Yes")
W,H,N=list(map(int,input().split()))
ten=[list(map(int,input().split())) for _ in range(N)]
base=[[0,0,1],[0,0,3],[W,H,2],[W,H,4]]
ten.extend(base)
onemax=max(i[0] for i in ten if i[2]==1)
twomin=min(i[0] for i in ten if i[2]==2)
thrmax=max(i[1] for i in ten if i[2]==3)
foumin=min(i[1] for i in ten if i[2]==4)
if (twomin-onemax)>0 and (foumin-thrmax) >0:
    print((twomin-onemax)*(foumin-thrmax))
else:print(0)

### FIXED CODE ###

ans=["No","Yes"]
candy=list(map(int,input().split()))
print(ans[sum(candy)/2 in candy])
n = int(input())
lists = [int(input()) for i in range(5)]
city = [0,0,0,0,0]
time = 0
phase = 1

while sum(city) < 25:
    for i in range(phase):
        city[i] = min(5,city[i] + lists[i])
        for j in range(5):
            if city[j] > 0:
                phase = max(phase,j+2)
    time += 1

print(time)

### FIXED CODE ###

import math
n = int(input())
lists = [int(input()) for i in range(5)]

print(math.ceil(n/min(lists)) + 4)
x= str(input())
a=list(x)
l=len(a)
if a[l-1]=='s':
    print(x+'es')
else:
    print(x+'s')

### FIXED CODE ###

x= str(input())
a=list(x)
l=len(a)
if a[l-1]=='s':
    print(x+'es')
else:
    print(x+'s')
N,K=map(int,input().split())
S = input()
 
S = list(s)
S[K - 1] = s[K - 1].lower()
S = "".join(S)
print(S)


### FIXED CODE ###

n,k=map(int,input().split())
a = input()
 
a = list(a)
a[k - 1] = a[k-1].lower()
a = "".join(a)
print(a)
N=int(input())
H=list(map(int,input().split()))
ans=0

while i < N-1:
  tmp=0
  for j in range(i,N-1):
    if H[j] >= H[j+1]:
      tmp += 1
    else:
      break
  ans = max(ans,tmp)
  i = i + tmp +1
print(ans)

### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))
ans=0
i = 0

while i < N-1:
  tmp=0
  for j in range(i,N-1):
    if H[j] >= H[j+1]:
      tmp += 1
    else:
      break
  ans = max(ans,tmp)
  i = i + tmp +1
print(ans)
from scipy.sparse import lil_matrix
from scipy.sparse.csgraph import minimum_spanning_tree

def main():
    N = int(input())
    M = 10**10
    XY = [tuple(map(int, input().split())) for _ in range(N)]
    xy = [(x, i) for i, (x, _) in enumerate(XY)]
    yx = [(y, i) for i, (_, y) in enumerate(XY)]
    xy.sort()
    yx.sort()
    d = {}
    x1, i1 = xy[0]
    for x, i in xy[1:]:
        t = (i1, i) if i1 < i else (i, i1)
        d[t] = min(abs(x1 - x), d.get(t, M))
        x1, i1 = x, i
    x1, i1 = yx[0]
    for x, i in yx[1:]:
        t = (i1, i) if i1 < i else (i, i1)
        d[t] = min(abs(x1 - x), d.get(t, M))
        x1, i1 = x, i
    l = lil_matrix((N, N), dtype=int)
    for (i, j), t in d.items():
        l[i, j] = t
    a = minimum_spanning_tree(l.tocsr())
    return a.sum(dtype=int)

print(main())


### FIXED CODE ###

from operator import itemgetter
from scipy.sparse import lil_matrix, csr_matrix
from scipy.sparse.csgraph import minimum_spanning_tree

def main():
    N = int(input())
    M = 10**10
    XY = [tuple(map(int, input().split())) for _ in range(N)]
    xy = [(x, i) for i, (x, _) in enumerate(XY)]
    yx = [(y, i) for i, (_, y) in enumerate(XY)]
    xy.sort()
    yx.sort()
    d = {}
    x1, i1 = xy[0]
    for x, i in xy[1:]:
        t = (i1, i) if i1 < i else (i, i1)
        d[t] = min(abs(x1 - x), d.get(t, M))
        x1, i1 = x, i
    x1, i1 = yx[0]
    for x, i in yx[1:]:
        t = (i1, i) if i1 < i else (i, i1)
        d[t] = min(abs(x1 - x), d.get(t, M))
        x1, i1 = x, i
    row = list(map(itemgetter(0), d.keys()))
    col = list(map(itemgetter(1), d.keys()))
    c = csr_matrix((list(d.values()), (row, col)), shape=(N, N))
    a = minimum_spanning_tree(c, overwrite=True)
    return int(a.sum())

print(main())
s = raw_input()
print (s.count("+") - s.count("-"))


### FIXED CODE ###

s = list(input())
n = 0
for i in range(4):
  if s[i] == "+":
    n += 1
  else:
    n -= 1
print(n)
n = int(input())
h = list(map(int, input().split()))

judge = 0
for i in range(n):
  if a[i] < judge:
    print("No")
    break
  judge = max(judge, a[i]-1)
else:
  print("Yes")

### FIXED CODE ###

N = int(input())
H = [int(x) for x in input().split()]
j = 0
Ans = True

for i in range(N-1):
    if H[i] > H[i+1] + 1:
        Ans = False
    elif H[i] == H[i+1] + 1:
        if H[i-j] == H[i]:
            j = 1
            continue
        else:
            Ans = False
            break
    elif H[i] == H[i+1]:
        j += 1
    else:
        j = 0
        continue

if Ans:
    print("Yes")
else:
    print("No")
r,s=map(int,input().split())
a=d=1,b=c=0
while r:q=r//s;r,s,a,c,b,d=s,r%s,c,a-q*c,d,b-q*d
print(a,b)


### FIXED CODE ###

r,s=map(int,input().split())
a=d=1;b=c=0
while s:q=r//s;r,s,a,c,b,d=s,r%s,c,a-q*c,d,b-q*d
print(a,b)
from math import factorial

def combinations_count(n, r):
    ''' 組み合わせ '''
    return factorial(n) // (factorial(n - r) * factorial(r))

#print(combinations_count(5, 2))
def modpow(a, n, MOD):
  res = 1
  while (n > 0):
    if (n & 1):
      res = res * a % MOD
    a = a * a % MOD
    n >>= 1
  return res

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
mod = 10 ** 9 + 7
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
 
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

K = int(input())
S = str(input())
N = len(S)

ans = 0
p = N + K - 1
#now = combinations_count(p, N - 1) % mod

for i in range(K + 1):
  p = N + K - i - 1
  now = cmb(p, N - 1, mod)
  a = pow(25, K - i, mod)
  b = pow(26, i, mod)
  c = a * b % mod
  ans += now * c % mod
  ans = ans % mod
print(ans)
  

### FIXED CODE ###

from math import factorial

def combinations_count(n, r):
    ''' 組み合わせ '''
    return factorial(n) // (factorial(n - r) * factorial(r))

#print(combinations_count(5, 2))
def modpow(a, n, MOD):
  res = 1
  while (n > 0):
    if (n & 1):
      res = res * a % MOD
    a = a * a % MOD
    n >>= 1
  return res

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
mod = 10 ** 9 + 7
N = 2 * 10 ** 6 + 1  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
 
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

K = int(input())
S = str(input())
N = len(S)

ans = 0
p = N + K - 1
#now = combinations_count(p, N - 1) % mod

for i in range(K + 1):
  p = N + K - i - 1
  now = cmb(p, N - 1, mod)
  a = pow(25, K - i, mod)
  b = pow(26, i, mod)
  c = a * b % mod
  ans += now * c % mod
  ans = ans % mod
print(ans)
N, M  = map(int, input().split())
A = [ input() for i in range(N)]
B = [ input() for i in range(M)]


def serch(x0, y0):
  for i in range(M):
    for j in range(M):
      if A[x0+i][y0+j] != B[i][j]:
        return False
  return True


for b in B:
  for x in range(N):
    for y in range(N):
      if not serch(x,y):
        continue
      else:
        print('Yes')
        exit()
print('No')


### FIXED CODE ###

N, M  = map(int, input().split())
A = [ input() for i in range(N)]
B = [ input() for i in range(M)]


def serch(x0, y0):
  for i in range(M):
    for j in range(M):
      if x0+i >= N or y0+j >= N:
        return False
      if A[x0+i][y0+j] != B[i][j]:
        return False
  return True

if M > N:
  print('No')
  exit()


for x in range(N):
  for y in range(N):
    if not serch(x,y):
      continue
    else:
      print('Yes')
      exit()
print('No')
n=int(input())
mod = 10**9+7

dp = [0]*(s+1)
dp[0] = 1

print(dp[])

### FIXED CODE ###

s=int(input())
mod = 10**9+7

dp = [0]*(s+1)
dp[0] = 1
x = 0

for i in range(1,s+1):
  if i-3>=0:
    x += dp[i-3]
    x %= mod
  dp[i]=x
print(dp[s])
str = [int(input()) for i in range(1)]
#input_sum = sum(str)
ans = str[0] * str[1]
print(ans)

### FIXED CODE ###

import fractions

str = input()
astr, bstr = str.split(" ")
a = int(astr)
b = int(bstr)

ans =  int((a*b)/ fractions.gcd(a, b))
print(ans)
# C
x, n = map(int, input().split())
p = list(map(int, input().split()))
ans = 0
if n == 0:
    print(x)
elif x not in p:
    print(x)
else:
    for i in range(102):
        if i not in p
            if abs(x - i) < abs(x - ans):
                ans = i
    print(ans)

### FIXED CODE ###

# C
x, n = map(int, input().split())
p = list(map(int, input().split()))
# print(p)
ans = 0
if n == 0:
    print(x)
elif x not in p:
    print(x)
else:
    for i in range(102):
        if i not in p:
            if abs(x - i) < abs(x - ans):
                ans = i
    print(ans)
x,y=int(map,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
print("Yes" if x in a and y in a or x in b and y in b or x==2 and y==2 else "No)

### FIXED CODE ###

x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
print("Yes" if x in a and y in a or x in b and y in b or x==2 and y==2 else "No")
n, m, k = [int(t) for t in open(0).read().split()]
mod = 998244353


def solve(n):
    if n <= k + 1:
        return pow(m, n, mod)
    elif n == k + 2:
        return (pow(m, n, mod) + mod - m) % mod
    else:
        return (m * solve(n - 1) - (m - 1) * solve(n - k - 2)) % mod


print(solve(n))


### FIXED CODE ###

n, m, k = [int(t) for t in open(0).read().split()]
mod = 998244353
mem = [0] * max(k + 3, n + 1)
for i in range(k + 2):
    mem[i] = pow(m, i, mod)
c = 1
for i in range(k + 2, n + 1):
    mem[i] = (m * mem[i - 1] - m * c * pow(m - 1, i - k - 2, mod)) % mod
    c = (c * (i - 1) * pow(i - k - 1, - 1, mod)) % mod
print(mem[n])
n = int(input())
t = list(map(int, input().split()))
m = int(input())
p, x = [], []
for i in range(m):
  q, y = map(int, input().split())
  p.append(q)
  x.append(y)
s = sum(t)
for j in range(m):
  print(int(s - t[p[j]] + x[j]))

### FIXED CODE ###

n = int(input())
t = list(map(int, input().split()))
m = int(input())
p = []
x = []
for i in range(m):
  q, y = map(int, input().split())
  p.append(q)
  x.append(y)
  
s = sum(t)
for j in range(m):
  print(s - t[p[j]-1] + x[j])
l = map(int, raw_input().split())
a-l[0] # A
b=l[1] # B
c=l[2] # C

A=b-a
B=c-b

if A==B:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

l = list(map(int, input().split()))
 
a=l[0]
b=l[1]
c=l[2]
 
A=b-a
B=c-b
 
if A==B:
    print('YES')
else:
    print('NO')