Harryxun/stf_run huggingface dataset:
n,m = map(int,input().split())
p = [[int(i) for i in input().split()] for _ in range(m)]
p.sort()

np = list(map(tuple,p))
np = list(set(np))
np.sort()
d = len(np)


a = True

if [1,0] in np:
  a = False
  
for x in range(d-1):
  if np[x][0] == np[x+1][0]:
    if np[x][1] != np[x+1][1]:
      a = False
      break
ans = 0
if a:
  if np[0][0] != 1:
    ans = 10 ** (n-1)
    for z in range(d):
      ans += 10 ** (n-np[z][0]) * np[z][1]
    print(ans)
  else:
    for r in range(d):
      ans += 10 ** (n-np[r][0]) * np[r][1]
    print(ans)
    
else:
  print(-1)
  
      

### FIXED CODE ###

#nは桁数　 (1,0)が含まれてる時と、(2,4),(2,7)みたいな入力の時はだめ
n,m = map(int,input().split())
s = [0]*m
c = [0]*m
d = dict()
ans = 0

for x in range(m):
    s[x],c[x] = map(int,input().split())
    if s[x] not in d:
        d[s[x]] = c[x]
    elif d[s[x]] != c[x]:
        ans = -1
        break

else:
    ans = ""
    for x in range(1,n+1):
        if x in d :
            if x != 1:
                ans += str(d[x])
            elif x == 1 and d[x] != 0:
                ans += str(d[x])
            elif n == 1 and d[x] == 0:
                ans += "0"
            else:
                ans = -1
                break
        else:
            if m != 0:
                if x == 1:
                    ans += str(1)
                else:
                    ans += str(0)
            else:
                if n == 1:
                    ans = str(0)
                else:
                    ans = "1" + ("0"*(n-1))

print(ans)
int(input().replace(' ','')
print("Yes" if int(s**0.5)**2==s) else "No")

### FIXED CODE ###

s = int(input().replace(' ',''))
print("Yes" if int(s**0.5)**2==s else "No")
import math
a,b=map(int,input().strip().split())
ans=0
sockets=1
while sockets<b:
  outlets-=1
  sockets+=a
  ans+=1
print(ans)

### FIXED CODE ###

import math
a,b=map(int,input().strip().split())
ans=0
sockets=1
while sockets<b:
  sockets-=1
  sockets+=a
  ans+=1
print(ans)
import itertools
n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
length = [i+1 for i in range(n)]
permut = list(itertools.permutations(length))
print(max((permut.index(p)) - (permut.index(q)) , (mm.index(q)) - mm.index(p)))


### FIXED CODE ###

import itertools
n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
length = [i+1 for i in range(n)]
permut = list(itertools.permutations(length))
print(max((permut.index(p)) - (permut.index(q)) , (permut.index(q)) - permut.index(p)))
k = int(input())
gx,gy = map(int,input().split())
if k%2 == 0 and (gx+gy)%2:
  print(-1)
  exit()
flgx = 1
flgy = 1
if gx < 0:
  flgx -= 2
  gx *= -1
if gy < 0:
  flgy -= 2
  gy *= -1
px = 0
py = 0
ansls = []
while True:
  if (gx-px+gy-py) <= 2*k:
    break
  if gx-px >= k:
    px += k
  elif gy-py >= k:
    py += k
  ansls.append((px,py))
if gx-px+gy-py <= 2*k:
  if gx-px+gy-py == 2*k:
    if px+k <= gx:
      px += k
    else:
      py += k
    ansls.append((px,py))
  if gx-px+gy-py == k:
    ansls.append((gx,gy))
  else:
    if (gx-px+gy-py)%2:
      print(2/0)
      if px+k <= gx:
        px += k
      elif py+k <= gy:
        py += k
      elif px+py+k <= gx+gy:
        px = gx
        py += k-(gx-px)
      else:
        py -= gx-px
        px -= k-(gx-px)
      ansls.append((px,py))
    if gx-px <= gy-py:
      ansls.append((px+(gx-px+gy-py)//2-k,py+(gx-px+gy-py)//2))
    else:
      ansls.append((px+(gx-px+gy-py)//2,py+(gx-px+gy-py)//2-k))
    ansls.append((gx,gy))
for i in range(len(ansls)-1):
  if abs(ansls[i+1][0]-ansls[i][0])+abs(ansls[i+1][1]-ansls[i][1]) != k:
    print("error")
print(len(ansls))
for x,y in ansls:
  print(x*flgx,y*flgy)
  
  

### FIXED CODE ###

k = int(input())
gx,gy = map(int,input().split())
if k%2 == 0 and (gx+gy)%2:
  print(-1)
  exit()
flgx = 1
flgy = 1
if gx < 0:
  flgx -= 2
  gx *= -1
if gy < 0:
  flgy -= 2
  gy *= -1
px = 0
py = 0
ansls = []
while True:
  if (gx-px+gy-py) <= 2*k:
    break
  if gx-px >= k:
    px += k
  elif gy-py >= k:
    py += k
  ansls.append((px,py))
if gx-px+gy-py <= 2*k:
  if gx-px+gy-py == 2*k:
    if px+k <= gx:
      px += k
    else:
      py += k
    ansls.append((px,py))
  if gx-px+gy-py == k:
    ansls.append((gx,gy))
  else:
    if (gx-px+gy-py)%2:
      if px+k <= gx:
        px += k
      elif py+k <= gy:
        py += k
      elif px+py+k <= gx+gy:
        py += k-(gx-px)
        px = gx
      else:
        py -= gx-px
        px -= k-(gx-px)
      ansls.append((px,py))
    if gx-px <= gy-py:
      ansls.append((px+(gx-px+gy-py)//2-k,py+(gx-px+gy-py)//2))
    else:
      ansls.append((px+(gx-px+gy-py)//2,py+(gx-px+gy-py)//2-k))
    ansls.append((gx,gy))
for i in range(len(ansls)-1):
  if abs(ansls[i+1][0]-ansls[i][0])+abs(ansls[i+1][1]-ansls[i][1]) != k:
    print("error")
print(len(ansls))
for x,y in ansls:
  print(x*flgx,y*flgy)
H, W, N = map(int, raw_input().split())
    dx = [-1, 0, 1, -1, 0, 1, -1, 0, 1]
    dy = [-1, -1, -1, 0, 0, 0, 1, 1, 1]
    board = {}
     
    for i in xrange(N):
        a, b = map(int, raw_input().split())
        for j in xrange(9):
            x, y = a+dx[j], b+dy[j]
            if x <= 1 or x >= H or y <= 1 or y >= W:
                continue
            if (x, y) in board:
                board[(x, y)] += 1
            else:
                board[(x, y)] = 1
    ans = [0] * 10
    for v in board.values():
        ans[v] += 1
    ans[0] = (H-2)*(W-2)-sum(ans)
    for a in ans:
        print a

### FIXED CODE ###

print (input()+input())*input()/2
#B-making trinagle
#while文を入れる場所がわからなかった
#import bisectってなんやねん
N = int(input())
A = list(map(int, input().split()))
A = sorted(A)
cnt = 0

def judge():
    if m == a + b:
        return "ok!"
    elif m >= a  b:
        return "high"
    else:
        return "low"

while True:
for i in range(N-2):
    a = list[i]
    for j in range(i + 1, N-1):
        b = list[j]
        if a == b:
            return True
        else:
            m = i + j
            while True:
            def judge(c)

cnt = m - j
print (cnt)

### FIXED CODE ###

N = int(input())
A = map(int, input().split())
A = sorted(A, reverse = False)
count = 0

for i in range(N-2):
    for j in range(i+1, N-1):
        for k in range(j+1, N):
            if (A[i] != A[j] != A[k]) and (A[k] < A[i] + A[j]):
                count += 1

print (count)
N=int(input())
a=math.ceil(N/1.08)
b=math.floor(a*1.08)
print(a if N==b else ":(")

### FIXED CODE ###

import math
N=int(input())
a=math.ceil(N/1.08)
b=math.floor(a*1.08)
print(a if N==b else ":(")
a,b,h=map(int,input().split())
print((a+b)*h//2)

### FIXED CODE ###

a= int(input())
b= int(input())
h=int(input())
print((a+b)*h//2)
x,y=map(int,input().split())
if x<0 and y<0 or x>0 and y>0 and y<x:
  print(abs(x-y)+2)
elif x=0 or y=0 and y<x:
  print(abs(x-y)+1)
else:
  print(min(abs(x-y),abs(-x-y)+1))


### FIXED CODE ###

x,y=map(int,input().split())
if (x<0 and y<0 or x>0 and y>0) and y<x:
  print(abs(x-y)+2)
elif x>=0 and y<=0:
  print(abs(abs(x)-abs(y))+1)
elif x<0 and y>0 and y>x:
    print(abs(abs(x)-abs(y))+1)
else:
    print(y-x)
from collections import deque

n = int(input())
ab = [list(map(int, input().split())) for i in range(n)]
ab = list(map(lambda x: [x[0], x[1], x[0]+x[1]], ab))
ab.sort(key=lambda x:x[2], reverse=True)
ab=deque(ab)
count = 0
ans=0
while len(ab)>0:
  a, b, dif = ab.popleft()
  if count%2==0:
    ans+=a
  else:
    ans-=b
  count+=1
print(ans)

### FIXED CODE ###

n = int(input())
ans=0
if n == 1:
  print(0)
  quit()

#test = 0
#for i in range(1, n):
#  if n//i == n%i:
#    test+=i
#print(test)
  
for i in range(1, n):
  #余り、商がi
  temp=n-i
  syou=temp/i
  #print(syou)
  if syou>i:
    if syou.is_integer():
      ans+=int(syou)
  else:
    break
print(ans)
N,M = map(int,input().split(" "))
fact = {}
for i in range(2,M):
    while (M%i == 0):
        if i in fact:
            fact[i] += 1
        else:
            fact[i] = 1
        M //= i
    if (M == 1):
        break


MOD = 10**9+7

def nCr_mod(n,r,mod): #nCrmod
    r = min(n-r,r)
    v = 1
    for i in range(r):
        v = (v * ((n-i)%mod) * pow((i+1),mod-2,mod)) % mod
    return v

ans = 1
for key,item in fact.items():
    ans *= nCr_mod((item + (N) - 1),N-1,MOD)
    ans %= MOD
print(ans)

### FIXED CODE ###

A,B,C = map(str,input().split(" "))

AB = max(int(A+B),int(B+A))
AC = max(int(A+C),int(C+A))
BC = max(int(B+C),int(C+B))
A,B,C = map(int,[A,B,C])
print(max([A+BC,B+AC,C+AB]))
N,K = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
import numpy as np
b = np.cumsum(np.array(a))
if b[-1] < K:
    print(N)
    exit()
elif b[0] >= K:
    print(0)
    exit()
import bisect
i = bisect.bisect(b,K)
w = K-a[i]
b = b[:i]
while b[-1] >= w:
    i = bisect.bisect(b,w)
    w -= a[i]
    if w <= 0:
        break
    b = b[:i]
    if len(b)==0:
        break
print(i)

### FIXED CODE ###

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

def f(N,K,a):
    a.sort()
    if a[0] >= K:
        print(0)
        exit()

    a = [a[i] for i in range(N) if a[i]<K]
    N = len(a)
    ans = N
    dp = [False]*K
    dp[0] = True
    Smax = 0
    for i,a_ in reversed(list(enumerate(a))):
        if Smax + a_ >= K:
            ans = i
        updated = True
        for j in range(min(Smax,K-a_-1),-1,-1):
            if dp[j]:
                dp[j+a_]=True
                if updated:
                    Smax = max(Smax,j+a_)
                    updated = False
    return ans

print(f(N,K,a))
import numpy as np
N=input()

lists = []
temp=np.asarray([i for i in range(10)])

dic={0:1}

for i in N:
    new_dic={}
    hoge=list(dic.items())
    if i == "?":
        for amari,count in hoge:
            amari*=10
            for num in temp:
                a = (amari + num) % 13
                if a in new_dic:
                    new_dic[a]+=count
                else:
                    new_dic[a]=count
    else:
        num=int(i)
        for amari,count in hoge:
            a = (amari*10 + num)%13
            if a in new_dic:
                new_dic[a]+=count
            else:
                new_dic[a]=count
    dic = new_dic

try:
    print(dic[5]%(10**9 + 7))
except:
    print(0)

### FIXED CODE ###


N=input()

lists = []
temp=[i for i in range(10)]

MOD=10**9+7

dic={0:1}

for i in N:
    new_dic={}
    hoge=list(dic.items())
    if i == "?":
        for amari,count in hoge:
            amari*=10
            for num in temp:
                a = (amari + num) % 13
                if a in new_dic:
                    new_dic[a]+=count
                else:
                    new_dic[a]=count
    else:
        num=int(i)
        for amari,count in hoge:
            a = (amari*10 + num)%13
            if a in new_dic:
                new_dic[a]+=count
            else:
                new_dic[a]=count
    for key in new_dic:
        new_dic[key] %= MOD
    dic = new_dic

try:
    print(dic[5])
except:
    print(0)
import sys
def gcd(a,b):
    if a%b==0:
        return b
    return gcd(b,a%b)

r=[map(int,line.split()) for line in sys.stdin]
for i in r:
    o=gcd(i[0],i[i])
    p=i[0]*i[1]/o
    print(o,p)



### FIXED CODE ###

import sys
def gcd(a,b):
    if a%b==0:
        return b
    return gcd(b,a%b)

r=[list(map(int,line.split())) for line in sys.stdin]
for i in r:
    o=gcd(i[0],i[1])
    p=i[0]*i[1]/o
    print(o,int(p))
~
"arc078_a.py" 13L, 193C                                       1,1          全て
N = int(input())
a = [int(n) for n in input().split()]

x = 0
y = sum(a)
res = 1000000000000000

for i in range(N-1):
  x += a[i]
  y -= a[i]
  if res > abs(x-y):
    res = abs(x-y)
print(res)

### FIXED CODE ###

N = int(input())
a = [int(n) for n in input().split()]

x = 0
y = sum(a)
res = 1000000000000000

for i in range(N-1):
  x += a[i]
  y -= a[i]
  if res > abs(x-y):
    res = abs(x-y)
print(res)
n = int(input())
import math
print(int(math.sqrt(n))

### FIXED CODE ###

n = int(input())
import math
print(int(math.sqrt(n))**2)
s = input().split()
k = int(s[0])
n = 3
ans={}
for i in reversed(range(1, k+1)):
    # print(i*(math.floor(k/i))**n)
    ans[i]=math.floor(k/i)**n
    l=2
    j=i*l
    while j<=k:
        ans[i]=ans[i]-ans[j]
        l +=1
        j = i*l
res=0
for i in ans:
    res+=i*ans[i]
print(res)

### FIXED CODE ###

import math
s = input()
k = int(s)
n = 3
ans={}
for i in reversed(range(1, k+1)):
    ans[i]=math.floor(k/i)**n
    l=2
    j=i*l
    while j<=k:
        ans[i]=ans[i]-ans[j]
        l +=1
        j = i*l
res=0
for i in ans:
    res+=i*ans[i]
print(res)
n,k = map(int,input().split())
have = [0] * n
for i in range (k):
  d = int(input())
  a = map(int,input().split())
  for j in a:
    have[i] += 1
ans = 0
for m in range (1,k+1):
  if have[m] == 0:
    ans += 1
print(ans)

### FIXED CODE ###

n,k = map(int,input().split())
x = []
for i in range (k):
  d = int(input())
  a = list(map(int,input().split()))
  x += a
print(n-len(set(x)))
a,b = map(input().split())
 
print(str(a*b), str(2(a+b)))

### FIXED CODE ###

a,b = list(map(int, input().split()))
c = 2 * (a+ b)
d = a * b

print(str(d) + " " + str(c))
def multigcd(n,arr):
  a,b=max(n,arr[0]),min(n,arr[0])
  while b!=0:
    a,b=b,a%b
  if len(arr)==1:
    return a
  else:
    return multigcd(a,arr[1:])

n=int(input())
arr=list(map(int,input().split()))
print(multigcd(arr[0],arr[1:]))

### FIXED CODE ###

def gcd(a,b):
  a,b=max(a,b),min(a,b)
  if b==0:
    return a
  else:
    return gcd(b,a%b)
 
n=int(input())
arr=list(map(int,input().split()))
tmp=gcd(arr[0],arr[1])
for i in range(1,n):
  tmp=gcd(tmp,arr[i])
print(tmp)
n,m = map(int,input().split())
AB = [(int(i) for i in input().split()) for j in range(n)]
AB.sort()
res = 0
for a,b in AB:
	m -= b
	if m >= 0:
		res += a*b
	else:
		m += b
		res += a*m
		break
print(res)


### FIXED CODE ###

n,m = map(int,input().split())
ab = []
for i in range(n):
        ab.append([int(j) for j in input().split()])
ab.sort()
cnt = 0
ans = 0
for i in ab:
    cnt += i[1]
    ans += i[0]*i[1]
    if cnt >= m:
        ans -= i[0]*(cnt-m)
        print(ans)
        exit()
H, W = map(int, input().split())
s = [input() for i in range(H)]

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

ans = True
for i in range(H):
    for j in range(W):
        if s[i][j]==".":
            continue
        else:
            check = True
            for k in range(len(dx)):
                x = i+dx[k]
                y = j+dy[k]
                if x<0 or x>(W-1) or y<0 or y>(H-1):
                    continue
                else:
                    if s[x][y]=='#':
                        check = False
            if check:
                ans = False
                break
    if not ans:
        break

if ans:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

H, W = map(int, input().split())
s = [input() for i in range(H)]

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

ans = True
for i in range(H):
    for j in range(W):
        if s[i][j] == '.':
            continue
        else:
            check = True
            for k in range(len(dx)):
                y = i+dy[k]
                x = j+dx[k]
                if x<0 or x>(W-1) or y<0 or y>(H-1):
                    continue
                else:
                    if s[y][x]=='#':
                        check = False
            if check:
                ans = False
                break
    if not ans:
        break

if ans:
    print("Yes")
else:
    print("No")
import math
n = int(input())
lr = [None]*10000
rmax = 0
for i in range(n):
    lr[i]= list(map(int,input().split()))
    if lr[i][1] > rmax:
        rmax = lr[i][1]

p = [1]*(rmax+1)
p[0]=0
p[1]=0
        

for j in range(2,int(math.sqrt(rmax)+1)):
    if p[j] == 0:
        continue
    for i in range(2,rmax+1):
        if i!=j and i%j == 0:
            p[i] = 0
for i in range(rmax, 1,-2):
    if p[int((i+1)/2)] == 0:
        p[i] = 0
p[2] = 0
for i in range(2,rmax):
    p[i+1] += p[i]  

for i in range(n):
    print(p[lr[i][1]] - p[lr[i][0]-1])
    

### FIXED CODE ###

import math
n = int(input())
lr = [None]*100000
rmax = 0
for i in range(n):
    lr[i]= list(map(int,input().split()))
    if lr[i][1] > rmax:
        rmax = lr[i][1]

p = [1]*(rmax+1)
p[0]=0
p[1]=0
        

for j in range(2,int(math.sqrt(rmax)+1)):
    if p[j] == 0:
        continue
    for i in range(2,rmax+1):
        if i!=j and i%j == 0:
            p[i] = 0
for i in range(rmax, 1,-2):
    if p[int((i+1)/2)] == 0:
        p[i] = 0
p[2] = 0
for i in range(2,rmax):
    p[i+1] += p[i]  

for i in range(n):
    print(p[lr[i][1]] - p[lr[i][0]-1])
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function,division
from itertools import combinations
import time
import sys
import io
import re
import math
start = time.clock()
i = 0
def enum_sum_numbers(sets, s_range, r):
    for cmb in combinations(sets,r):
        yield sum(cmb)
    if r <=s_range:
        for s in enum_sum_numbers(sets,s_range, r+1):
            yield s

sys.stdin.readline()
a=[int(s) for s in sys.stdin.readline().split()]
sys.stdin.readline()
ms=[int(s) for s in sys.stdin.readline().split()]
sets={s for s in enum_sum_numbers(a,len(a)),1}
for m in ms:
    print('yes' if m in sets else 'no')

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function,division
import time
import sys
import io
import re
import math
start = time.clock()
i = 0

sys.stdin.readline()
a=[int(s) for s in sys.stdin.readline().split()]
sys.stdin.readline()
ms=[int(s) for s in sys.stdin.readline().split()]
ans=set([0])
for i in a:
    ans|=set(j+i for j in ans)
ans=list(ans)
for jk in ms:
    if jk in ans: print('yes')
    else: print('no')
import math
li = input().split()	
x=int(li[0])
y=int(li[1])
print((x * y) // math.gcd(x, y))


### FIXED CODE ###

import fractions
x,y = map(int,input().split())
print(x*y//fractions.gcd(x,y))
temp = int(input())
if temp>=30:
  print("Yes")
else:
  print("No)    

### FIXED CODE ###

temp = int(input())
if temp>=30:
  print("Yes")
else:
  print("No")
N = int(input())
if N>0 or N<=100:
    A = []
    for i in range(0,N):
      B = int(input())
      if B>0 or B<=1000:
          A.append(B)
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = 1/sum1
    print(result)

### FIXED CODE ###

if __name__=="__main__":
    import sys
    a = int(input())
    s = input()

if a>=3200:
    print(s)
else:
    print('red')
n = int(input())
DP = [[0] * 3 for _ in range(n+1)]
A = []
for i in range(n):
    A.append(list(map(int, input().split())))
for i in range(1, n+1):
    for j in range(0, 3):
        for k in range(0, 3):
            if j != k:
                DP[i][j] = max(DP[i][j], DP[i-1][k] + A[i-1][j])
print(max(DP[-1]))

### FIXED CODE ###

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

DP = [10 ** 9] * n
DP[0] = 0

for i in range(1, n):
    DP[i] = min(DP[i], DP[i-1] + abs(H[i] - H[i-1]))
    if i > 1:
        DP[i] = min(DP[i], DP[i-2] + abs(H[i] - H[i-2]))
print(DP[-1])
list1=[]
A1,A2,A3=map(int,input().split())
A4,A5,A6=map(int,input().split())
A7,A8,A9=map(int,input().split())
N=int(input())
for i in range(1,N+1):
    list1.append(int(input()))

list2=[A1,A2,A3,
    A4,A5,A6,
    A7,A8,A9]
for x in range(N):
    if (list1[x] in list2)==True:
        list2[x]="Bingo"
    elif (list1[x] in list2)==False:
        list2[x]="Not-Bingo"

if list2[0]==list2[1] and list2[1]==list2[2]:
    print("Yes")
elif list2[0]==list2[3] and list2[3]==list2[6]:
    print("Yes")
elif list2[3]==list2[4] and list2[4]==list2[5]:
    print("Yes")
elif list2[6]==list2[7] and list2[4]==list2[8]:
    print("Yes")
elif list2[1]==list2[4] and list2[4]==list2[7]:
    print("Yes")
elif list2[2]==list2[5] and list2[5]==list2[8]:
    print("Yes")
elif list2[0]==list2[4] and list2[4]==list2[8]:
    print("Yes")
elif list2[2]==list2[4] and list2[4]==list2[6]:
    print("Yes")
else:print("No")
    

### FIXED CODE ###

import sys
list1=[]
list3=["Bingo","Bingo","Bingo"]
A1,A2,A3=map(str,input().split())
A4,A5,A6=map(str,input().split())
A7,A8,A9=map(str,input().split())
n=int(input())
list1=[input() for i in range(1,n+1)]
list2=[[A1,A2,A3],
    [A4,A5,A6],
    [A7,A8,A9]]
for y in range(3):
    for x in range(n):
            if (list1[x] in list2[y])==True:
                s=list2[y].index(list1[x])
                list2[y][s]="Bingo"
#横
for i in range(3):
    if list2[i]==list3:
        print("Yes")
        sys.exit()
#斜め
if list2[0][0]==list2[1][1] and list2[1][1]==list2[2][2]:
    print("Yes")
elif list2[0][2]==list2[1][1] and list2[1][1]==list2[2][0]:
    print("Yes")
#縦
elif list2[0][0]==list2[1][0] and list2[1][0]==list2[2][0]:
    print("Yes")
elif list2[0][1]==list2[1][1] and list2[1][1]==list2[2][1]:
    print("Yes")
elif list2[0][2]==list2[1][2] and list2[1][2]==list2[2][2]:
    print("Yes")
elif n<=2:
    print("No")
else:
    print("No")
n, k = map(int, input().split())
p = list(map(int, input().split()))
px = [(1 + p[i])/2 for i in range(n)]

ans = sum(px[0: 0 + k])
bef = sum(px[0: 0 + k])
for i in range(i, n - k + 1):
    bef = bef-px[i-1]+px[i+k-1]
    ans = max(ans, bef)
print(ans)


### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))
px = [(1 + p[i])/2 for i in range(n)]

ans = sum(px[0: 0 + k])
bef = sum(px[0: 0 + k])
for i in range(1, n - k + 1):
    bef = bef-px[i-1]+px[i+k-1]
    ans = max(ans, bef)
print(ans)
import math
from fractions import Fraction
                                                                                                           

A,B=map(float,input().split())

A=Fraction(A,15)
B=Fraction(B,15)

ans=A*B

print(math.floor(ans))

### FIXED CODE ###


A,B=map(float,input().split())

A=int(A)
B=int(B*1000)

ans=A*B//1000

print(ans)
b = list(map(int,input().split()))
ans = b[0]
for i in range(n - 2):
    
    ans += min(b[i],b[i + 1])

ans += b[-1]
print(ans)

### FIXED CODE ###

n = int(input())
b = list(map(int,input().split()))
ans = b[0]
for i in range(n - 2):
    
    ans += min(b[i],b[i + 1])

ans += b[-1]
print(ans)
n, x, m = map(int, input().split())

mn = min(n, m)
S = set()
A = []
sum_9 = 0 # sum of pre + cycle

for len_9 in range(mn):
    if x in S: break
    S.add(x)
    A.append(x)
    sum_9 += x
    x = x*x % m

pre_len = A.index(x)
cyc_len = len(A) - pre_len
nxt_len = (n - pre_len) % cyc_len

cyc_num = (n - pre_len) // cyc_len

pre = sum(A[:pre_len])
cyc = sum_9 - pre
nxt = sum(A[pre_len: pre_len + nxt_len])

print(pre + cyc * cyc_num + nxt)


### FIXED CODE ###

n, x, m = map(int, input().split())
mn = min(n, m)
S = set()
A = []
a = x
ans = 0
for i in range(mn):
    if a in S: break
    S.add(a)
    A.append(a)
    ans += a
    a = a*a%m
    if a == 0:
        print(ans)
        exit()

# print(S)
# print(A)
# print(len(A), n, m)
if len(A) < mn:
    st_len = 0
    while st_len < len(A) and a != A[st_len]: st_len += 1
    st = sum(A[:st_len])
    cyc_sum = sum(A[st_len:])
    cyc_len = len(A) - st_len
    cyc_num = (n - st_len) // cyc_len
    # print('m {} n {} st_len {} cyc_len {} cyc_num {}'.format(m,n,st_len,cyc_len,cyc_num))
    cyc = cyc_sum * cyc_num
    ed_len = (n - st_len) % cyc_len
    ed = sum(A[st_len:][:ed_len])
    print(st + cyc + ed)
else:
    print(ans)
N = int(input())
K = int(n**(1/2))
a = len(str(N))

for i in range(1,k+1):
  if N%i==0:
    a=len(str(n//i))

print(a)

### FIXED CODE ###

N = int(input())
a = len(str(N))

for i in range(1,int(N**(1/2))+1):
  if N%i==0:
    a=len(str(N//i))

print(a)
N = int(input())
H = list(map(int,input().split()))
c,ans= 0
if N == 1:
    print(0)
else:
    for i in range(N-1):
        if H[i+1] <= H[i]:
            c += 1
        else:
            ans = max(c,ans)
            c = 0
print(c)

### FIXED CODE ###

N = int(input())
H = list(map(int,input().split()))
c = 0
ans = 0
if N == 1:
    print(0)
else:
    for i in range(N-1):
        if H[i+1] <= H[i]:
            c += 1
        else:
            ans = max(c,ans)
            c = 0
    ans = max(c,ans)
    print(ans)
X, t = map(int, input().split())
print(max(X-t),0)

### FIXED CODE ###

X, t = map(int, input().split())
print(max(X-t,0))