Harryxun/stf_run huggingface dataset:
S = [input() for i in range(N) ]
list_S.sort()
list_a = []
a = 0
for i in range(N-1):
    if list_S[i] == list_S[i+1]:
        a += 1
    else:
        list_a.append(a+1)
        a = 0
list_a.append(a+1)
newlist_a = sorted(list_a,reverse=True)
n = newlist_a.count(newlist_a[0])
ans = ""
if n == 1:
    t = 0
    for i in range(list_a.index(newlist_a[0])):
        t += list_a[i]
    if N == 1:
        ans = list_S[t]
    else:
        ans = list_S[t+1]
else:
    if newlist_a[0]==1:
        for i in range(len(list_S)):
            ans += list_S[i]
            ans += "\n"
    else:            
        list_t = []
        a = 0
        for i,x in enumerate(list_a):
            if x == newlist_a[0]:
                list_t.append(sum(list_a[0:i]))
                ans += list_S[list_t[a]]
                ans += "\n"
                a += 1
print(ans)


### FIXED CODE ###

import collections

N = int(input())
S = [input() for i in range(N)]
c =collections.Counter(S)
C = c.most_common()
list_C = []
for i in range(len(c)):
    list_C.append(C[i][1])
m = 1
for i in range(len(list_C)-1):
    if list_C[i]==list_C[i+1]:
        m += 1
    else:
        break
ans= []
for i in range(m):
    ans.append(C[i][0])
ans = sorted(ans)
for i in range(len(ans)):
    print(ans[i])
N,M=map(int,input().split())

pos=[]
for i in range(M):
    array=list(map(int,input().split()))
    pos.append(array)

flg=True
num=[-1 for i in range(N)]

for i in range(M):
    if num[pos[i][0]-1]==-1 or num[pos[i][0]]==pos[i][1]:
        if i!=0 or pos[i][1]!=0:
            num[pos[i][0]-1]=pos[i][1]
        else:
            flg=False
    else:
        flg=False

for i in range(len(num)):
    if num[i]==-1:
        if i==0:
            num[i]=1
        else:
            num[i]=0

ans=0
for i in range(N):
    ans+=num[i]*10**(N-i-1)

if flg:
    print(ans)
else:
    print("-1")

### FIXED CODE ###

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

pos=[]
for i in range(M):
    array=list(map(int,input().split()))
    pos.append(array)

flg=True
num=[-1 for i in range(N)]

for i in range(M):
    if num[pos[i][0]-1]==-1 or num[pos[i][0]-1]==pos[i][1]:
        if pos[i][0]-1!=0 or pos[i][1]!=0:
            num[pos[i][0]-1]=pos[i][1]
        else:
            if N==1:
                num[pos[i][0]-1]=pos[i][1]
            else:
                flg=False
    else:
        flg=False

for i in range(len(num)):
    if num[i]==-1:
        if i==0:
            if N==1:
                num[i]=0
            else:
                num[i]=1
        else:
            num[i]=0

ans=0
for i in range(N):
    ans+=num[i]*10**(N-i-1)

if flg:
    print(ans)
else:
    print("-1")
n = int(input())

S = list(str(input()) for i in range(n))
SortedS = sorted(S) #辞書式にソート
s = [] #各文字列の回数
S2 = [] #各文字列
count = 1
for i in range(n - 1):
    if i == n - 2 and SortedS[i] != SortedS[i + 1]:
        s.append(count)
        s.append(1)
        S2.append(SortedS[i])
        S2.append(SortedS[i + 1])
    
    else:
        if SortedS[i] == SortedS[i + 1]:
            count += 1
            if i == n - 2:
                s.append(count)
                S2.append(SortedS[i])
        else:
            s.append(count)
            S2.append(SortedS[i])
            count = 1
ans = []
M = max(s)
for i in range(len(s)):
    if s[i] == M:
        print(ans[i])

### FIXED CODE ###

n = int(input())

S = list(str(input()) for i in range(n))
SortedS = sorted(S) #辞書式にソート
s = [] #各文字列の回数
S2 = [] #各文字列
count = 1
for i in range(n - 1):
    if i == n - 2 and SortedS[i] != SortedS[i + 1]:
        s.append(count)
        s.append(1)
        S2.append(SortedS[i])
        S2.append(SortedS[i + 1])
    
    else:
        if SortedS[i] == SortedS[i + 1]:
            count += 1
            if i == n - 2:
                s.append(count)
                S2.append(SortedS[i])
        else:
            s.append(count)
            S2.append(SortedS[i])
            count = 1

M = max(s)
for i in range(len(s)):
    if s[i] == M:
        print(S2[i])
x = int(input())

import math

h = math.floor(x/3600)
m = math.floor((x -h*3600)/60)
s = math.floor(x - h*3600 - m*60)
print0(h, ':',m , ':', s)



### FIXED CODE ###

x = int(input())

h = x // 3600
m = (x % 3600)//60
s = x % 60

print(h, m, s, sep=":")
n = int(input())
mx = 1
for i in range(2,n**(1/2)+1):
  if n%i == 0:
    mx = i
print(len(str(n//mx)))
    
    

### FIXED CODE ###

n = int(input())
mx = 1
for i in range(2,int(n**(1/2))+1):
  if n%i == 0:
    mx = i
print(len(str(n//mx)))
import sys
n=int(input())
a=list(map(int,input().split()))

def mergesort(a):
    def _merge_sort(a, left: int, right: int):
        if left < right:
            center = (left+right)//2

            _merge_sort(a,left,center)
            _merge_sort(a,center+1,right)

            #pは前半部をbuffにコピーする際のインデックス、jで取り出す
            p=j=0
            i=k=left

            #配列の前半部をbuffにコピー
            while i <= center:
                buff[p]=a[i]
                p+=1
                i+=1

            #後半部をコピーされた前半部と比較、小さい方をaに格納していく
            while i<= right and j < p:
                if buff[j] <= a[i]:
                    a[k]=buff[j]
                    j+=1
                else:
                    a[k]=a[i]
                    i+=1
                k+=1

            while j < p:
                a[k] =buff[j]
                k+=1
                j+=1

    n=len(a)
    #merge結果を一時的に格納
    buff=[None]*n
    _merge_sort(a,0,n-1)
    del buff

mergesort(a)

if a[0]==1:
    if a[1]==1:
        print(0)
        sys.exit()
    else:
        print(1)
        sys.exit()

if a[0]==a[1]:
    count=0
else:
    count=1

for i in range(n-1):
    if (i+1)!=n-1 and a[i+2]==a[i+1]:
        continue
    if a[i+1]==a[i]:
        continue
    for l in range(i+1):
        if a[i+1]%a[l]==0:
            break
        if i==l:
            count+=1

print(count)

### FIXED CODE ###

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

a.sort()
amx=max(a)+1
l=[True]*amx
ans=0

for i in range(n-1):
    if l[a[i]]:
        for j in range(a[i],amx,a[i]):
            l[j]=False
        if a[i]<a[i+1]:
            ans+=1

if l[-1]:
    ans+=1

print(ans)
a = int(input())
b = int(input())

if a > 8 or b > 8:
    print(":(")



else:
    print("Yay!")

### FIXED CODE ###

num = input()

num = num.split(" ")

for i in range(len(num)-1):
    if int(num[i]) <= 8 and int(num[i+1]) <= 8:
        print("Yay!")

    else:
        print(":(")
x = input()
print(x**3)

### FIXED CODE ###

x=int(input())
print(x**3)
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = list(input())
for i in range(n-k):
    if t[i] == t[i+k]:
        t[i+k] = "d"

t = "".join(t)
t = t.replace("r", "{}+".format(p)).replace("p", "{}+".format(s)).replace("s", "{}+".format(r)).replace("d", "0+") + "0"
print(eval(t))


### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = list(input())
for i in range(n-k):
    if t[i] == t[i+k]:
        t[i+k] = "d"

t = "".join(t)
t = t.replace("r", "{}+".format(p)).replace("p", "{}+".format(s)).replace("s", "{}+".format(r)).replace("d", "0+") + "0"
print(eval(t))
SHINJUKU

### FIXED CODE ###

x=input()
N=len(x)
maxl=0
for i in range(N):
  if (x[i]=="A")or(x[i]=="T")or(x[i]=="G")or(x[i]=="C"):
    j=1
    while (i+j<N):
      if ((x[i+j]=="A")or(x[i+j]=="T")or(x[i+j]=="G")or(x[i+j]=="C")):
        j=j+1
      else:
        break
    if maxl<j:
      maxl=j
      maxi=i
    
print(maxl)
N, M = map(int, input().split())
P = [i -1 for i in map(int,input().split())]
ss = set([])
point = 0
for i in range(N):
    if point in ss:
        break
    ss.add(point)
    point = P[point]
S = [0]
points = 0
for i in range(len(ss)-1):
    points = P[points]
    S.append(points)
loop = S[S.index(points):]
ll = len(S)
l = len(loop)
if ll >= M:
    print(S[M]+1)
else:
    print(loop[(M-ll)%l]+1)


### FIXED CODE ###

N, M = map(int, input().split())
P = [i -1 for i in map(int,input().split())]
ss = set([])
point = 0
for i in range(N):
    if point in ss:
        break
    ss.add(point)
    point = P[point]
S = [0]
points = 0
for i in range(len(ss)-1):
    points = P[points]
    S.append(points)
loop = S[S.index(point):]
ll = len(S)
l = len(loop)
if ll > M:
    print(S[M]+1)
elif ll == M:
    print(point+1)
else:
    print(loop[(M-ll)%l]+1)
a,b=map(int,input().split(' '))
print(-(-a//(1+2*b)))

### FIXED CODE ###

print(3*int(input())**2)
n = int(input())
w = list(map(int,input().split()))
ans = float('inf')
for j in range(n):
  ans = min(ans,abs(sum(w[0:j])-sum(w[j:n])))
print(ans)



### FIXED CODE ###

a,b,c = map(int, input().split())
print(min(a+b,b+c,c+a))
import sys
import copy
input = sys.stdin.readline


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

ans=-1*(10**10)

if K<100000:
    for i in range(N):
    tmp=0
    pos=i
    count=0
    while count<K:    
        #print(pos,P[pos])
        tmp+=C[P[pos]-1]
        if tmp>ans:
            ans=tmp
        
        pos=P[pos]-1
        count+=1
 
    print(ans)
else:
    
    for i in range(N):
        tmp=0
        pos=i
        gpos=i
        count=0
        while count<K:    
            #print(pos,P[pos])
            tmp+=C[P[pos]-1]
            if tmp>ans:
                ans=tmp
            
            
            pos=P[pos]-1
            count+=1
            if pos==gpos and count!=K:
                divide=K//count
                tmp=tmp*divide
                count=count*divide
                gpos=10**10
            
    
    print(ans)

### FIXED CODE ###

import sys
import copy
input = sys.stdin.readline


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

ans=-1*(10**10)

if K<10000000:
    for i in range(N):
        tmp=0
        pos=i
        count=0
        while count<K:    
            #print(pos,P[pos])
            tmp+=C[P[pos]-1]
            if tmp>ans:
                ans=tmp
            
            pos=P[pos]-1
            count+=1
     
    print(ans)
else:
    
    for i in range(N):
        tmp=0
        pos=i
        gpos=i
        count=0
        while count<K:    
            #print(pos,P[pos])
            tmp+=C[P[pos]-1]
            if tmp>ans:
                ans=tmp
            
            
            pos=P[pos]-1
            count+=1
            if pos==gpos:
                divide=K//count-1
                tmp=tmp*divide
                count=count*divide
                gpos=10**10
            
    
    print(ans)
import math
a,b,x=map(int,input().split())
h=x/(a**2)
if x >= (b*a**2)/2:
  beta=math.atan((a/2)/(b-h))
  alfa=(math.pi)/2 - beta
else:
  alfa=math.atan(b/(2*x/(a*b)))
print(math.degrees(alfa))

### FIXED CODE ###

import math
a,b,x=map(int,input().split())
L=b*a**2
if L==x:
  alfa=0
elif x >= L/2:
  h=x/(a**2)
  beta=math.atan((a/2)/(b-h))
  alfa=(math.pi)/2 - beta
else:
  alfa=math.atan(b/(2*x/(a*b)))
print(math.degrees(alfa))
N = int(input())
H = list(map(int, input().split()))
result = []
count = 0

for i in range (len(H)-1):
  if H[i] >= H[i+1]:
    count += 1
    result.append(count)
  else:
    result.append(count)
    count=0

print(max(result))

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
result = []
count = 0
i = 0

for i in range (N-1):
  if H[i] >= H[i+1]:
    count += 1
  else:
    result.append(count)
    count=0

"""
while i <= N-2:#Hの最終インデックスはN-1、最終インデックスの探索は不要なのでN-2とする
  if H[i] >= H[i+1]:
    count += 1
    i += 1
  else:
    result.append(count)
    i += count+1
    count = 0
"""

result.append(count) #最終インデックスが絡む部分は上記while内ではappendされないため

print(max(result))
N,K=map(int,input().split())
dp=[1000000000000000]*N
h=[int(x) for x in input().split()]
dp[0]=0
for i in range(N):
    dp=dp[:i] + ([x if x<dp[i]+abs(h[i+j]-h[i]) else dp[i]+abs(h[i+j]-h[i]) for j,x in enumerate(dp[i:(i+K+1 if i+K+1<N else N)])]) + (dp[i+K+1:] if i+K+1<N else [])
#    for j in range(i,i+K+1 if i+K+1 < N else N):
#        dp[j] = dp[j] if dp[j]<dp[i]+abs(h[j]-h[i]) else dp[i]+abs(h[j]-h[i])
    print(dp)

### FIXED CODE ###

N,K=map(int,input().split())
dp=[1000000000000000 for i in range(N)]
h=[int(x) for x in input().split()]
dp[0]=0
for i in range(N):
    for j in range(i,i+K+1 if i+K+1 < N else N):
        dp[j] = dp[j] if dp[j]<dp[i]+abs(h[j]-h[i]) else dp[i]+abs(h[j]-h[i])
print(dp[-1])
n,m=map(int,input().split())
py=[[0]*3 for _ in range(m)]
for i in range(m):
    p,y=map(int,input().split())
    py[i][0],py[i][1],py[i][2]=p,y,i
py.sort()
ans=[[''] for _ in range(m)]
cnt=[0]*m
for p,y,i in py:
    cnt[p]+=1
    ans[i]='0'*(6-len(str(p)))+str(p)+'0'*(6-len(str(cnt[p])))+str(cnt[p])
for i in ans:
    print(i)

### FIXED CODE ###

def resolve():
    n,m=map(int,input().split())
    py=[[0]*3 for _ in range(m)]
    for i in range(m):
        p,y=map(int,input().split())
        py[i][0],py[i][1],py[i][2]=p,y,i
    py.sort()
    ans=[[''] for _ in range(m)]
    cnt=[0]*(n+1)
    for p,y,i in py:
        cnt[p]+=1
        ans[i]='0'*(6-len(str(p)))+str(p)+'0'*(6-len(str(cnt[p])))+str(cnt[p])
    for i in ans:
        print(i)


if __name__ == '__main__':
    resolve()
from sys import stdin
import numpy as np

readline = stdin.readline

N, Q = map(int, readline().split())
C = np.array(list(map(int, readline().split())), dtype=np.int64)
S = np.array([list(map(int, readline().split())) for _ in range(Q)], dtype=np.int64).reshape(Q,2)

def main(N, Q, C, S):    
  # Binary Indexed Tree 
  # https://juppy.hatenablog.com/entry/2018/11/17/%E8%9F%BB%E6%9C%AC_python_Binary_Indexed_Tree_%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0
  b = np.zeros(N+1, dtype = np.int64)
  def BIT_query(idx): #idxまでの和(1からスタート)
    res_sum = 0
    while idx > 0:
      res_sum += b[idx]
      idx -= idx&(-idx) #一番下の位を減らす（例：13=1011 → 1010 → 1000） 
    return res_sum
  def BIT_update(idx,x): #idxをx増やした時
    while idx <= N:
      b[idx] += x
      idx += idx&(-idx) #一番下の位を繰り上げる（例：13=1011 → 1100 → 10000 ※N=16のとき） 
    return

  loc = np.zeros(N, dtype = np.int64) #各種類の玉のうちの最右端の所在地
  S = [[S[i,1], S[i,0], i] for i in range(Q)] #クエリ
  S.sort() #区間の右端でソート
  S = np.array(S, dtype = np.int64)
  #print(S)
  ans = np.zeros(Q, dtype = np.int64)
  k = 0
  for j in range(N):
    if loc[C[j]-1] > 0: #玉の更新
      BIT_update(loc[C[j]-1], -1)
    loc[C[j]-1] = j+1
    BIT_update(j+1, 1)  
    
    if S[k,0] == j+1:
      t = BIT_query(j+1)
    while k < len(S) and S[k][0] == j+1: #クエリへの返答
      ans[S[k,2]] = t - BIT_query(S[k,1]-1)
      k += 1
    if k == len(S):
      break
  return ans



ans = main(N, Q, C, S)
for a in ans:
  print(int(a))

### FIXED CODE ###

from sys import stdin
#import numpy as np

readline = stdin.readline

N, Q = map(int, readline().split()) 
C = list(map(int, readline().split())) 
S = [list(map(int, readline().split())) for _ in range(Q)] 
#print(S)
def main(N, Q, C, S):    
  # Binary Indexed Tree 
  # https://juppy.hatenablog.com/entry/2018/11/17/%E8%9F%BB%E6%9C%AC_python_Binary_Indexed_Tree_%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0
  b = [0 for _ in range(N+1)]
  def BIT_query(idx): #idxまでの和(1からスタート)
    res_sum = 0
    while idx > 0:
      res_sum += b[idx]
      idx -= idx&(-idx) #一番下の位を減らす（例：13=1011 → 1010 → 1000） 
    return res_sum
  def BIT_update(idx,x): #idxをx増やした時
    while idx <= N:
      b[idx] += x
      idx += idx&(-idx) #一番下の位を繰り上げる（例：13=1011 → 1100 → 10000 ※N=16のとき） 
    return

  loc = [0 for _ in range(N)] #各種類の玉のうちの最右端の所在地
  S = [(S[i], i) for i in range(Q)] #クエリ
  S.sort(key = lambda s: s[0][1]) #区間の右端でソート
  #S = np.array(S, dtype = np.int64)
  #print(S)
  ans = [0 for _ in range(Q)]
  k = 0
  for j in range(N):
    if loc[C[j]-1] > 0: #玉の更新
      BIT_update(loc[C[j]-1], -1)
    loc[C[j]-1] = j+1
    BIT_update(j+1, 1)  
    
    if S[k][0][1] == j+1:
      t = BIT_query(j+1)
    while k < len(S) and S[k][0][1] == j+1: #クエリへの返答
      ans[S[k][1]] = t - BIT_query(S[k][0][0]-1)
      k += 1
    if k == len(S):
      break
  return ans

ans = main(N, Q, C, S)
print(*ans, sep='\n')
import numpy as np

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

grids = []
for _ in range(H):
    grids.append(input())

hr_scores = []
vr_scores = []

for h in range(H):
    cnt = 0
    start_w = 0
    lis = []
    for w in range(W):
        if grids[h][w] == '.':
            cnt += 1
        else:
            lis += [cnt] * (w - start_w) + [0]
            start_w = w + 1
            cnt = 0
    if cnt:
        lis += [cnt] * (w - start_w + 1)
    hr_scores.append(lis)

for w in range(W):
    cnt = 0
    start_h = 0
    lis = []
    for h in range(H):
        if grids[h][w] == '.':
            cnt += 1
        else:
            lis += [cnt] * (h - start_h) + [0]
            start_h = h + 1
            cnt = 0
    if cnt:
        lis += [cnt] * (h - start_h + 1)
    vr_scores.append(lis)

hr_scores = np.array(hr_scores)
vr_scores = np.array(vr_scores)
print(max((hr_scores + vr_scores).max() - 1, 0))

### FIXED CODE ###

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

grids = []
for _ in range(H):
    grids.append(input())

hr_scores = []
vr_scores = []


max_value = 0
for w in range(W):
    cnt = 0
    start_h = 0
    lis = []
    for h in range(H):    
        if grids[h][w] == '.':
            cnt += 1
        else:
            lis += [cnt] * (h - start_h) + [0]
            start_h = h + 1
            cnt = 0
    if cnt:
        lis += [cnt] * (h - start_h + 1)
    vr_scores.append(lis)
vr_scores = [[vr_scores[w][h] for w in range(W)] for h in range(H)]
for h in range(H):
    cnt = 0
    start_w = 0
    lis = []
    for w in range(W):
        if grids[h][w] == '.':
            cnt += 1
        else:
            lis += [cnt] * (w - start_w) + [0]
            if cnt:
                max_value = max(
                    max_value,
                    max(vr_scores[h][start_w: w]) + cnt
                )
            start_w = w + 1
            cnt = 0
    if cnt:
        max_value = max(
            max_value,
            max(vr_scores[h][start_w: w + 1]) + cnt
         )

print(max(max_value - 1, 0))
N=int(input())
H=list(map(int, input().split()))
ans=0
if H[1]>=H[0]:
    ans+=1
for i in range(N-2):
    if H[i+2]>=H[i+1] and H[i+2]>=H[0]:
        ans+=1
print(ans+1)

### FIXED CODE ###

N=int(input())
H=list(map(int, input().split()))
ans=1
m=H[0]
for i in range(1,N):
    if H[i]>=m:
        ans+=1
        m=H[i]
print(ans)
print(int(n**0.5)**2)

### FIXED CODE ###

print(int(int(input())**0.5)**2)
s = input()
d = {}
for ss in s:
    d[ss] = d.get(ss, 0) + 1

print("Yes" if len(d) == 2 and d.items()[0][1] == 2 else "No")

### FIXED CODE ###

s = input()
d = {}
for ss in s:
    d[ss] = d.get(ss, 0) + 1

print("Yes" if len(d) == 2 and list(d.items())[0][1] == 2 else "No")
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a <= k:
  print('Yey)
else:
  print(':)')

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a <= k:
  print('Yay!')
else:
  print(':(')
a = int(input())
l = list(map(int, input().split()))
for i in range(a):
  if l[i] >= max(l[0:i]):
    c +=1
print(c)

### FIXED CODE ###

a = int(input())
l = list(map(int, input().split()))
c = 1
for i in range(1, a):
  if l[i] >= max(l[:i]):
    c +=1
print(c)
print( 800*int(input()) - 200*(int(input()) // 15))

### FIXED CODE ###

a = int(input())
print( 800*a - 200*(a//15) )
t_hp,t_at,a_hp,a_at=input().split()
while(int(t_hp) > 0 and int(a_hp) > 0):
  int(a_hp) -= int(t_at)
  if int(a_hp) <= 0:
    print("Yes")
    break
  int(t_hp) -= int(a_at)
  if int(t_hp <= 0:
         print("No")
         break

### FIXED CODE ###

t_hp,t_at,a_hp,a_at=map(int,input().split())
while(t_hp > 0 and a_hp > 0):
  a_hp -= t_at
  if a_hp <= 0:
    print("Yes")
    break
  t_hp -= a_at
  if t_hp <= 0:
         print("No")
         break
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split(" ")]

print(n - len(a))


### FIXED CODE ###

n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

print(n - len(set(a)))
#!/usr/bin/env python3
import sys

MOD = 1000000007  # type: int


def solve(N: int, A: "List[int]"):
    a_sum = [int()]*60

    for a in A:
        for i, r_a in enumerate(format(a, "b")[::-1]):
            if r_a == "1":
                a_sum[i] += 1

    a_sum = [a_s_*(2**i)%MOD for i, a_s_ in zip(range(60), a_sum)]
    a_acc_sum = a_sum.copy()
    for x in range(1,60):
        a_acc_sum[x] = a_acc_sum[x-1] + a_acc_sum[x] 
    
    ans = 0
    for a in A:
        for i, r_a in enumerate(format(a, "b")[::-1]):
            if r_a == "0":
                ans += a_sum[i]
        
        ans += a_acc_sum[59] - a_acc_sum[i]

        # for ic in range(i+1,60):
            # ans+=a_sum[ic]
            # ans%=MOD

    print(ans%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
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

MOD = 1000000007  # type: int


def solve(N: int, A: "List[int]"):
    A = [format(a, "b")[::-1] for a in A]
    a_sum = [int()]*60

    for a in A:
        for i, r_a in enumerate(a):
            if r_a == "1":
                a_sum[i] += 1

    a_sum = [a_s_*(2**i)%MOD for i, a_s_ in zip(range(60), a_sum)]
    a_acc_sum = [_ for _ in a_sum]
    
    for x in range(1,60):
        a_acc_sum[x] = a_acc_sum[x-1] + a_acc_sum[x] 
    
    ans = 0
    for a in A:
        for i, r_a in enumerate(a):
            if r_a == "0":
                ans += a_sum[i]
        
        ans += a_acc_sum[59] - a_acc_sum[i]

        # for ic in range(i+1,60):
            # ans+=a_sum[ic]
            # ans%=MOD

    print(ans%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
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()
t = [0]
x = [0]
y = [0]
N = int(input())
for i in range(N):
  ti,xi,yi = map(int,input(),split())
  t.append(ti)
  x.append(xi)
  y.append(yi)
  
flg = True
 
for i in range(1,N+1):
  if t[i]-t[i-1] <　x[i]-x[i-1] + y[i]-y[i-1]:
    flg = False
  else (t[i]-t[i-1])%2 != (x[i]-x[i-1]+y[i]-y[i-1])%2:
    flg = False
if(flg):
  print("Yes")
else:
  print("No")


### FIXED CODE ###

t = [0]
x = [0]
y = [0]
n = int(input())
for i in range(n):
    ti, xi, yi = map(int, input().split())
    t.append(ti)
    x.append(xi)
    y.append(yi)
    
flg=True
for i in range(1, n+1):
    if((x[i]-x[i-1])+(y[i]-y[i-1])>(t[i]-t[i-1])):
        flg=False
    elif(((x[i]-x[i-1])+(y[i]-y[i-1]))%2!=(t[i]-t[i-1])%2):
        flg=False
if(flg):
    print("Yes")
else:
    print("No")
vb

### FIXED CODE ###

a,b,t = map(int,input().split())
print((t//a)*b)
n, m = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A)

from bisect import insort_left

for _ in range(m):
    x = A.pop()//2
    insort_left(A, x)

print(sum(A))


### FIXED CODE ###

S = input()
if S=='Sunny':
    print('Cloudy')
elif S=='Cloudy':
    print('Rainy')
else:
    print('Sunny')
W,H,r,x,y = list(map(int,input().split()))
if 0 <= r - x <= r + x and 0 <= y - r <= y + r:
 print('yes')
else:
 prtin('no')

### FIXED CODE ###

W, H, x, y, r = list(map(int, input().split()))
print('Yes' if 0 <= x - r <= x + r <= W and 0 <= y - r <= y + r <= H else 'No')