Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

# ABC171 E 

import itertools

n = int(input())
a_l = [format(int(x), "030b") for x in input().split()]

for _d,_tp in enumerate(zip(*a_l)):
    if "1" not in _tp:
        continue
    if "0" not in _tp:
        continue
    else:
        _l = list(_tp)
        _l.sort()
        gr = itertools.groupby(_l)
        _num = 0
        for key, group in gr:
            if key == "0":
                _num = len(list(group))
        if _num % 2 == 1:
            for i in range(n):
                _str = list(a_l[i])
                if _str[_d] == "0":
                    _str[_d] = "1"
                else:
                    _str[_d] = "0"
                a_l[i] = "".join(_str)

print(*[int(x, 2) for x in a_l])

### FIXED CODE ###

# ABC171 E 

import itertools

n = int(input())
a_l = [list(format(int(x), "030b")) for x in input().split()]

for _d,_tp in enumerate(zip(*a_l)):
    if "1" not in _tp:
        continue
    if "0" not in _tp:
        continue
    else:
        _num = _tp.count("0")
        if _num % 2 == 1:
            for i in range(n):
                if a_l[i][_d] == "0":
                    a_l[i][_d] = "1"
                else:
                    a_l[i][_d] = "0"

print(*[int("".join(x), 2) for x in a_l])
### BUGGY CODE ###

from itertools import accumulate

def solve():
    MOD = 10 ** 9 + 7

    def max2(x, y): return x if x >= y else y

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

    dp = [0] * (K+1)
    dp[0] = 1
    for A in As:
        accDP = [0] + list(accumulate(dp))
        accDP = [accDPi % MOD for accDPi in accDP]
        dp = [(accDP[j+1] - accDP[max2(0, j-A)]) % MOD for j in range(K+1)]

    print(dp[K])


solve()


### FIXED CODE ###

from itertools import accumulate

MOD = 10 ** 9 + 7

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

dp = [0] * (K+1)
dp[0] = 1
for A in As:
    accDP = [0] + list(accumulate(dp))
    accDP = [accDPi % MOD for accDPi in accDP]
    dp = [(accDP[j+1] - accDP[max(0, j-A)]) % MOD for j in range(K+1)]

print(dp[K])
### BUGGY CODE ###

import sys

n ,k = map(int, input().split())
arr = list(map(int, input().split()))

dp = [sys.maxsize] * n
dp[0] = 0

for i in range(0,n):
    for j in range(i+1, min(i+k+1,n)):
        dp[j] = min(dp[i] + abs(arr[j]-arr[i]),dp[j])

print(dp[-1])

### FIXED CODE ###

def main():
	N, K = map(int, input().split())
	h = list(map(int, input().split()))
 
	dp=[0]*N
 
	for i in range(1,N):
		dp[i] = min(
			dp[g] + abs(h[i] - h[g]) for g in range(max(i-K,0), i)
		)
	print(dp[N-1])
main()
### BUGGY CODE ###

import functools
import operator

prod = functools.partial(functools.reduce, operator.mul)

N,K,*A = map(int, open(0).read().split())

p = None
j = 0
for i in range(K, N+1):
    c = prod(A[j:i])
    if p:
        if p < c:
            print('Yes')
        else:
            print('No')
    p = c
    j += 1

### FIXED CODE ###

N,K,*A = map(int, open(0).read().split())

for i,n in enumerate(range(K-1, N)):
    if i == 0:
        continue
    if A[n-K] < A[n]:
        print('Yes')
    else:
        print('No')
### BUGGY CODE ###

s=int(input())

#0<= x,y <=10**9
#s/2

if s<=10**9:
    print(0,0,1,0,0,s)
    exit()


for i in range(int(s**0.5)):
    ss=int(s**0.5)-i
    #print(ss)
    if s%ss==0:
        print(0,0,ss,0,0,s//ss)
        exit()



### FIXED CODE ###

import sys
input=sys.stdin.readline

s=int(input())

#0<= x,y <=10**9
#s/2

if s<=10**9:
    print(0,0,1,0,0,s)
    exit()

y=(-1*s//(10**9))*(-1)
x=10**9*y-s

print(0,0,10**9,1,x,y)
### BUGGY CODE ###

L,R = map(int,input().split())
ans = float('inf')

for i in range(L,R):
    for j in range(i+1,R+1):
        ans = min(ans,(i * j)%2019)
print(ans)

### FIXED CODE ###

L,R = map(int,input().split())
ans = float('inf')

for i in range(L,R):
    for j in range(i+1,R+1):
        ans = min(ans,(i * j)%2019)
        if ans == 0:
            break
    else:
        continue
    break
print(ans)
### BUGGY CODE ###

K = int(input())

queue = list(range(1, 10))

for i in range(K):
    x = queue.pop(0)
    shimo1keta = x % 10
    if shimo1keta != 0:
        queue.append(x * 10 + shimo1keta - 1)
    queue.append(x * 10 + shimo1keta)
    if shimo1keta != 9:
        queue.append(x * 10 + shimo1keta + 1)

print(x)


### FIXED CODE ###

from collections import deque

K = int(input())
queue = deque(range(1, 10))

for i in range(K):
    x = queue.popleft()
    shimo1keta = x % 10
    if shimo1keta != 0:
        queue.append(x * 10 + shimo1keta - 1)
    queue.append(x * 10 + shimo1keta)
    if shimo1keta != 9:
        queue.append(x * 10 + shimo1keta + 1)

print(x)
### BUGGY CODE ###

n, q = map(int, input().split())
A = [set([]) for _ in range(n+1)]
for _ in range(n-1):
    a, b = map(int, input().split())
    A[a].add(b)
    A[b].add(a)
S = [1]
while S:
    a_1 = S[0]
    for a_2 in A[a_1]:
        A[a_2] -= {a_1}
        S += a_2,
    S.pop(0)
C = [0]*(n+1)
for _ in range(q):
    p_1, x = map(int, input().split())
    C[p_1] += x
    T = [p_1]
    while T:
        p_1 = T[0]
        for p_2 in A[p_1]:
            C[p_2] += x
            T += p_2,
        T.pop(0)
print(*C[1:])


### FIXED CODE ###

n, q = map(int, input().split())
A = [set([]) for _ in range(n+1)]
for _ in range(n-1):
    a, b = map(int, input().split())
    A[a].add(b)
C = [0]*(n+1)
for _ in range(q):
    p, x = map(int, input().split())
    C[p] += x
for i in range(1, n+1):
    c = C[i]
    for a in A[i]:
        C[a] += c
print(*C[1:])
### BUGGY CODE ###

import math

# 素数リスト生成　eratosthenes
def makePrime(m):
    p = [i for i in range(m + 1)]
    for i in p[3:]:
        if p[i] % 2 == 0: p[i] = 0

    root_m = m ** 0.5
    for i in range(3,m):
        if i > root_m: break
        if p[i] != 0:
            for j in range(i, m + 1, 2):
                if i * j >= m + 1: break
                p[i * j] = 0
    #return p
    return sorted(list(set(p)))[2:]


# 素数かどうか判定
def isPrime(x):
    if x <= 1:
        return False
    
    for i in range(2,math.floor(math.sqrt(x))+1):
        if (x % i) == 0:
            return False
    return True

# zの値を作成
def z_make(n,p):
    for prime in p:
        for i in range(1,100000000000):
            z = prime ** i
            
            if z >= n:
                break
            
            if not z in memo:
                memo.append(z)

def divGame2(n):
    for z in memo:
        global ans
        if n % z == 0:
            rem = n / z
            memo.remove(z)
            ans += 1
            #print("n=",n," z=",z,"rem=",rem," ans=",ans)
            return divGame2(rem)
        

memo = []  # memory
ans = 0    # answer
p = []     # Prime

n = int(input())
p = makePrime(100000)

if isPrime(n): # 素数だったら１が答え
    print(1)
else:
    z_make(n,p)  # zの値を生成。memoができる
    memo.sort()  # 念のため並び替え
    #print(memo)
    divGame2(n)  # メイン実行
    print(ans)   # 答えの出力


### FIXED CODE ###

n = int(input())

i = 2
memo = []
while( i*i <= n ):
    x = 0
    while(n % i == 0):
        #print("n % i == 0 =",n,i,"n/i=",n/i,x+1)
        n = int(n / i);
        x = x + 1
    memo.append([i,x])
    i = i + 1

if not (n == 1):
    memo.append([n,1])

ans = 0
for i in memo:
    x = i[1]
    b = 1
    while b <= x:
        x = x - b
        b = b + 1
        ans = ans + 1

print(ans)
### BUGGY CODE ###

N,K=map(int,input().split())
H=[0]+list(map(int,input().split()))

inf=float('inf')
DP=[inf]*(N+1)  #DP[0]はダミー
DP[1]=0

def culc(index):   #index>=2
    global DP
    global H
    global K

    head=max(1,index-K)

    for i in range(head,index):
        DP[index]=min(DP[index],DP[i]+abs(H[i]-H[index]))

for j in range(2,N+1):
    culc(j)

print(DP[N])
    



### FIXED CODE ###

N,K=map(int,input().split())
H=[0]+list(map(int,input().split()))

inf=float('inf')
DP=[inf]*(N+1)  #DP[0]はダミー
DP[1]=0

def culc(index):   #index>=2
    global DP
    global H
    global K

    head=max(1,index-K)

    for i in range(head,index):
        DP[index]=min(DP[index],DP[i]+abs(H[i]-H[index]))

for j in range(2,N+1):
    culc(j)

print(DP[N])
### BUGGY CODE ###


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


dp = [10 ** 10] * N
dp = dp + [10 ** 10] * 1000
dp[0] = 0

footing = footing + [0] * 1000
# give
'''
for i in range(N-1):
    for k in range(1, K+1):
        if dp[i+k] > dp[i] + abs(footing[i+k] - footing[i]):
            dp[i+k] = dp[i] + abs(footing[i+k] - footing[i])

print(dp[N-1])
'''
# get
for i in range(1,N):
    for j in range(1,min(K+1, i+1)): 
        dp[i] = min(dp[i],dp[i-j] + abs(footing[i]-footing[i-j])) 

print(dp[N-1])

### FIXED CODE ###

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


dp = [10 ** 10] * N
dp = dp + [10 ** 10] * 1000
dp[0] = 0

footing = footing + [0] * 1000
# give
'''
for i in range(N-1):
    for k in range(1, K+1):
        if dp[i+k] > dp[i] + abs(footing[i+k] - footing[i]):
            dp[i+k] = dp[i] + abs(footing[i+k] - footing[i])

print(dp[N-1])
'''
# get
for i in range(1,N):
    for j in range(1,min(K+1, i+1)): 
        dp[i] = min(dp[i],dp[i-j] + abs(footing[i]-footing[i-j])) 

print(dp[N-1])
### BUGGY CODE ###

s = input()
q = int(input())
ans = ""
for _ in range(q):
  t = input().split()
  if t[0] == '1':
    s=s[::-1]
  else:
    if t[1] == '1':
      s = (str(t[2]) +str(s))
    else:
      s = (str(s) + str(t[2]))
print(str(s))

### FIXED CODE ###

s = input()
q = int(input())
l = []
r = []
c = 0
for _ in range(q):
  t = input().split()
  if t[0] == '1':
    c += 1
    a = l
    l = r
    r = a
  else:
    if t[1] == '1':
      l.append(t[2])
    else:
      r.append(t[2])
l = "".join(l[::-1])
r = "".join(r)
if c%2 ==0:
  print(l + s + r)
else:
  print(l + s[::-1] + r)
### BUGGY CODE ###

import bisect
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0

for i in range(n):
    for j in range(i+1, n):
        length = l[i] + l[j]

        index = bisect.bisect_left(l[j+1:], length)
        ans += index

print(ans)

### FIXED CODE ###

import bisect
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
biSet = set()


for i in range(n):
    for j in range(i+1, n):
        length = l[i] + l[j]

        index = bisect.bisect_left(l[j+1:], length)
        #print(index)
        if index > 0:
            ans += index


print(ans)
### BUGGY CODE ###

from collections import defaultdict

N = int(input())
edges = defaultdict(list)
inp = []
for i in range(N-1):
    a, b = map(int, input().split())
    edges[a].append(b)
    edges[b].append(a)
    inp.append((a, b))


# node: (id, parent_id)
root_node = (1, -1)
open_list = [root_node]
n2c = defaultdict(list)
ans = {}
while True:
    if len(open_list)==0:
        break
    cur_node = open_list.pop()
    cur_id, parent_id = cur_node
    adj_id_list = edges[cur_id]
    for child_id in adj_id_list:
        if child_id == parent_id:
            continue
        color = 1
        while True:
            if not color in n2c[cur_id]:
                n2c[cur_id].append(color)
                n2c[child_id].append(color)
                ans[(cur_id, child_id)] = color
                break
            color += 1
        open_list.append((child_id, cur_id))

print(max(list(map(lambda x:len(x), n2c.values()))))
for a, b in inp:
    if (a, b) in ans.keys():
        print(ans[(a, b)])
    else:
        print(ans[(b, a)])

### FIXED CODE ###

from collections import defaultdict, deque

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


# node: (id, parent_id)
root_node = (1, -1)
open_list = deque([root_node])
ans = {}
colors = [-1]*(N+1)
while open_list:
    cur_node = open_list.popleft()
    cur_id, parent_id = cur_node
    adj_id_list = E[cur_id]
    c = 1
    for child_id in adj_id_list:
        if child_id == parent_id:
            continue
        if c == colors[cur_id]:
            c += 1
        colors[child_id] = c
        c += 1
        open_list.append((child_id, cur_id))

print(max(colors))
for i in edge_order:
    print(colors[i])
### BUGGY CODE ###

count = 0
flag = 0

def merge(a, left, mid, right):
    global count
    L = [0] * (mid - left + 1)
    R = [0] * (right - mid + 1)

    for i in range(len(L)):
        if i  == len(L) - 1:
            L[i] = float('inf')
        else:
            L[i] = a[left+i]
    
    for i in range(len(R)):
        if i == len(R) - 1:
            R[i] = float('inf')
        else:
            R[i] = a[mid+i]

    i = 0
    j = 0
    for k in range(left, right):
        if L[i] <= R[j]:
            a[k] = L[i]
            i += 1
        else:
            if i != len(L) - 1 and j != len(R) - 1:
                count += len(L) - i - 1
            a[k] = R[j]
            j += 1

def mergeSort(a, left, right):
    if left+1 < right:
        mid = int((left + right) / 2)
        mergeSort(a, left, mid)
        mergeSort(a, mid, right)
        merge(a, left, mid, right)

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

mergeSort(a, 0, n)

for i in range(len(a)-1):
    x = a[i]
    y = a[i+1]

    if x == y:
        flag = 1
        break

if flag == 0:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

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

a = set(a)

if n == len(a):
    print('YES')
else:
    print('NO')
### BUGGY CODE ###

def print_list_split_whitespace(a):
    for x in a[:-1]:
        print(x, end=' ')
    print(a[-1])


def calc_puddle(map, l, r):
    ans = 0
    top = map[l]
    before = map[l]
    for i in range(l + 1, r + 1):
        be_ans = ans
        if map[i] == before:
           ans += top - map[i]
        elif map[i] < before:
            ans += top - map[i] - 0.5
            before = map[i]
        else:
            ans += top - map[i] + 0.5
            before = map[i]
        #print(ans - be_ans)
    return int(ans)


cross_section = list(input())
map = [0]
y = 0
for c in cross_section:
    if c == "/":
        y += 1
        map.append(y)
    elif c == "\\":
        y += -1
        map.append(y)
    else:
        map.append(y)
max_right = len(map) - 1
#print(map)
#print(len(map))

left = 0
right = 1
ans = []
while left < max_right:
    #print(left, right)
    if map[left] <= map[right]:
        left = right
        right += 1
        if right == max_right:
            left = max_right
    elif right == max_right:
        break
    else:
        right += 1
        if map[left] == map[right]:
            ans.append(calc_puddle(map, left, right))
        elif right == max_right:
            left += 1
            right = left + 1
            if right == max_right:
                left = max_right

print(sum(ans))
ans.insert(0, len(ans))
print_list_split_whitespace(ans)


### FIXED CODE ###

def print_list_split_whitespace(a):
    for x in a[:-1]:
        print(x, end=' ')
    print(a[-1])
    
s = list(input())
st1 = []
st2 = []

for index, c in enumerate(s):
    if c == "\\":
        st1.append(index)
    elif c == "/":
        if len(st1) >= 1:
            pop_index = st1.pop()
            area = index - pop_index
            while True:
                if len(st2) >= 1:
                    ind, pop_area = st2.pop()
                else:
                    st2.append((index, area))
                    break
                if ind < pop_index:
                    st2.append((ind, pop_area))
                    st2.append((index, area))
                    break
                else:
                    area += pop_area

a = 0
k = len(st2)
ls = [k]
for _, s in st2:
    a += s
    ls.append(s)

print(a)
print_list_split_whitespace(ls)
### BUGGY CODE ###

from heapq import heapify,heappop,heappush
import sys
read=sys.stdin.readline
class mset:
    def __init__(self):
        self.p,self.q=[],[]
        heapify(self.p);heapify(self.q)
    def add(self,a):
        heappush(self.p,a)
    def delete(self,a):
            heappush(self.q,a)
    def minimum(self):
        while self.q and self.p[0]==self.q[0]:
            heappop(self.p);heappop(self.q)
        return self.p[0] if self.p else None

N,Q=map(int,read().split())
event=[]
for i in range(N):
    S,T,X=map(int,read().split())
    event.append((1,S-X,X))
    event.append((0,T-X,X))

s=mset()
now=0
for i in range(Q):
    D=int(read())
    event.append((2,D,0))
event.sort(key=lambda x:(x[1],x[0]))

for c,t,w in event:
    if c==0:
        s.delete(w)
    elif c==1:
        s.add(w)
    else:
        m=s.minimum()
        print(-1 if m==None else m)

### FIXED CODE ###

from heapq import heapify,heappop,heappush
import sys
read=sys.stdin.readline
class mset:
    def __init__(self):
        self.p,self.q=[],[]
        heapify(self.p);heapify(self.q)
    def add(self,a):
        heappush(self.p,a)
    def delete(self,a):
            heappush(self.q,a)
    def minimum(self):
        while self.q and self.p[0]==self.q[0]:
            heappop(self.p);heappop(self.q)
        return self.p[0] if self.p else None

N,Q=map(int,read().split())
event=[]
for i in range(N):
    S,T,X=map(int,read().split())
    event.append((1,S-X,X))
    event.append((0,T-X,X))

s=mset()
now=0
for i in range(Q):
    D=int(read())
    event.append((2,D,0))
event.sort(key=lambda x:(x[1],x[0]))

for c,t,w in event:
    if c==0:
        s.delete(w)
    elif c==1:
        s.add(w)
    else:
        m=s.minimum()
        print(-1 if m==None else m)
### BUGGY CODE ###

n, e = [int(item) for item in input().split()]
edge = [[] for _ in range(n)]
source_num = [0] * n
distance = [0] * n
for i in range(e):
    f, t = map(int, input().split())
    f -= 1
    t -= 1
    source_num[t] += 1
    edge[f].append(t)
while e > 0:
    for i, item in enumerate(source_num):
        if item != 0:
            continue
        source_num[i] = -1
        for v in edge[i]:
            distance[v] = max(distance[v], distance[i] + 1)
            source_num[v] -= 1
            e -= 1
print(max(distance))

### FIXED CODE ###

from collections import deque
n, e = [int(item) for item in input().split()]
edge = [[] for _ in range(n)]
source_num = [0] * n
distance = [0] * n
for i in range(e):
    f, t = map(int, input().split())
    f -= 1
    t -= 1
    source_num[t] += 1
    edge[f].append(t)

dq = deque()
for i, item in enumerate(source_num):
    if item == 0:
        dq.append(i)
        source_num[i] = -1
while(dq):
    i = dq.pop()
    source_num[i] = -1
    for v in edge[i]:
        distance[v] = max(distance[v], distance[i] + 1)
        source_num[v] -= 1
        if source_num[v] == 0:
            dq.append(v)
print(max(distance))
### BUGGY CODE ###

from bisect import bisect
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans = 0
for i  in range(n-2):
    a = l[i]
    for j in range(i+1,n-1):
        b = l[j]
        max_c = a+b-1
        ans += bisect(l[j+1:],max_c)
print(ans)

### FIXED CODE ###

from bisect import bisect_left
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans = 0
for i  in range(n-2):
    a = l[i]
    for j in range(i+1,n-1):
        b = l[j]
        k = bisect_left(l,a+b)
        ans += k-j-1
print(ans)
### BUGGY CODE ###

def main():
    n, k = map(int, input().split())
    A = [int(a) for a in input().split()]

    score = 1
    for i in range(k):
        score *= A[i]

    for i in range(n - k):
        tmp = (score // A[i]) * A[k + i]

        if tmp > score:
            print("Yes")
        else:
            print("No")

        score = tmp

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n, k = map(int, input().split())
    A = [int(a) for a in input().split()]
        
    for i in range(n - k):
        if A[i + k] > A[i]:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()
### BUGGY CODE ###

S = input()
dp = [[0 for j in range(13)]for i in range(10**5+1)]
dp[0][0] = 1
for i in range(len(S)):
    c = 0
    if S[i] == '?':
        c = -1
    else:
        c = int(S[i])

    for j in range(10):
        if c != -1 and c!= j:
            continue
        for ki in range(13):
            dp[i+1][(ki*10+j)%13] += dp[i][ki]
    for j in range(13):
        dp[i+1][j] %= 10**9+7
    
print(dp[len(S)][5])

### FIXED CODE ###

S = input()
dp = [[0 for j in range(13)]for i in range(10**5+1)]
dp[0][0] = 1
for i in range(len(S)):
    c = 0
    if S[i] == '?':
        c = -1
    else:
        c = int(S[i])

    for j in range(10):
        if c != -1 and c!= j:
            continue
        for ki in range(13):
            dp[i+1][(ki*10+j)%13] += dp[i][ki]
    for j in range(13):
        dp[i+1][j] %= 10**9+7
    
print(dp[len(S)][5])
### BUGGY CODE ###

import sys
readline = sys.stdin.readline

N,X,Y = map(int,readline().split())

G = [[] for i in range(N)]
G[X - 1].append(Y - 1)
G[Y - 1].append(X - 1)

for i in range(N - 1):
  G[i].append(i + 1)
  G[i + 1].append(i)
  
ans = [0 for i in range(N)]

from collections import deque
for st in range(N):
  q = deque([[st,0]])
  visited = set()
  while q:
    v,dist = q.popleft()
    if v in visited:
      continue
    visited.add(v)
    ans[dist] += 1
    for child in G[v]:
      q.append([child, dist + 1])
    
for i in range(1, N):
  print(ans[i] // 2)

### FIXED CODE ###

N,X,Y=map(int,input().split())

E=[[] for i in range(N)]

for i in range(N-1):
  E[i].append(i+1)
  E[i+1].append(i)
  
E[X-1].append(Y-1)
E[Y-1].append(X-1)

INF=10**4

ans=[0 for i in range(N)]
from collections import deque
for i in range(N):
  score=[INF for i in range(N)]
  q=deque([[i,0]])
  while q:
    v,dist=q.pop()
    if score[v]>dist:
      score[v]=dist
    else:
      continue
    for child in E[v]:
      q.append([child,dist+1])
  for s in score:
    ans[s]+=1
    
for i in range(1,N):
  print(ans[i]//2)
### BUGGY CODE ###

import sys
S = input()

length = len(S)
i = length

while i > 0:
    if S[i-5:i] == 'dream':
        i -= 5
    elif S[i-7:i] == 'dreamer':
        i -= 7
    elif S[i-5:i] == 'erase':
        i -= 5
    elif S[i-6:i] == 'eraser':
        i -= 6
    else:
        print('NO')
    
print('YES')


### FIXED CODE ###

import sys
S = input()[::-1]

length = len(S)
i = 0

while i < length:
    if S[i:i+5] == 'dream'[::-1]:
        i += 5
    elif S[i:i+7] == 'dreamer'[::-1]:
        i += 7
    elif S[i:i+5] == 'erase'[::-1]:
        i += 5
    elif S[i:i+6] == 'eraser'[::-1]:
        i += 6
    else:
        print('NO')
        sys.exit()
    
print('YES')
### BUGGY CODE ###

N, M = map(int, input().split())  #数字
H = list(map(int, input().split()))#リスト
A = [list(map(int, input().split())) for i in range(M)]  #数字、複数行複数列

good = []
bad = []
for i in range(M):
    left = H[A[i][0] - 1]
    right = H[A[i][1] - 1]
    if left < right:
        good.append(A[i][1])
        bad.append(A[i][0])
    if left > right:
        good.append(A[i][0])
        bad.append(A[i][1])
    if left == right:
        bad.append(A[i][0])
        bad.append(A[i][1])

B = list(i for i in set(good))
C = list(i for i in set(bad))

#print(B)
#print(C)

D = list(i for i in B if i not in C)
E = D + C
F = list(i for i in range(1,N+1) if i not in E)

#print(D)
#print(F)
print(len(D) + len(F))

### FIXED CODE ###

N, M = map(int, input().split())  #数字
H = list(map(int, input().split()))#リスト
A = [list(map(int, input().split())) for i in range(M)]  #数字、複数行複数列

good = [True]*N
for i, j in A:
    i -= 1
    j -= 1
    if H[i] < H[j]:
        good[i] = False
    if H[i] > H[j]:
        good[j] = False
    if H[i] == H[j]:
        good[i] = False
        good[j] = False

print(good.count(True))
### BUGGY CODE ###

def main():
    n,k=map(int,input().split())
    P=list(map(int,input().split()))
    ave=[(p+1)/2 for p in P]
    L=[sum(ave[i:i+k]) for i in range(n-k+1)]
    print(max(L))
main()

### FIXED CODE ###

def main():
    n,k=map(int,input().split())
    P=list(map(int,input().split()))
    ave=[(p+1)/2 for p in P]
    s=sum(ave[:k])
    ans=s
    for left in range(n-k):
        s -= ave[left]
        s += ave[left+k]
        if s>ans:
            ans = s
    print(ans)
main()