Harryxun/stf_run huggingface dataset:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())

dis = abs(a-b)
sub = w-v

if(-(sub*t)>=dis):
    print("YES")
else:
    print("NO")

### FIXED CODE ###

s = input()
print(s[0:3])
import math
n,k=map(int,input().split())
a=list(map(int,input().split()))
a=1
b=max(a)
c=(a+b)//2
while True:
  div=0
  for i in range(n):
    div+=math.ceil(a[i]/c)-1
  if div<=k:
    b=c
    c=(a+b)//2
  else:
    a=c
    c=(a+b)//2
    
  if c==a or c==b:
    break
print(b)

### FIXED CODE ###

import math
n,k=map(int,input().split())
log=list(map(int,input().split()))
a=0
b=max(log)
if b==1:
  print(1)
  exit()
c=(a+b)//2
while True:
  div=0
  for i in range(n):
    div+=math.ceil(log[i]/c)-1
  if div<=k:
    b=c
    c=(a+b)//2
  else:
    a=c
    c=(a+b)//2
    
  if c==a or c==b:
    break
print(b)
a=input()
b=input()
print a*b,2*a+2*b

### FIXED CODE ###

a,b=map(int,raw_input().split())
print a*b,(a+b)*2
from collections import deque
h,w=map(int,input().split())
S=[input() for _ range(h)]
inf=float("inf")
ans=0
for i in range(h):
   for j in range(w):
      if S[i][j]=="#":
         continue
      else:
         DP=[[inf for _ in range(w)]for _ in range(h)]
         DP[i][j]=0
         que=deque([(i,j)])
         while que:
            si,sj=que.popleft()
            for ni,nj in [(si+1,sj)(si-1,sj)(si,sj+1)(si,sj-1)]:
               if 0<=ni<h and 0<=nj<w and S[ni][nj]!="#":
                  if DP[ni][nj]>DP[si][sj]+1:
                     DP[ni][nj]=DP[si][sj]+1
                     que.append((ni,nj))
                     ans=max(ans,DP[si][sj]+1)
print(ans)
                   

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
from collections import deque
 
H,W = map(int,readline().split())
H += 2; W += 2
grid = '#' * W
for _ in range(H-2):
    grid += '#' + readline().rstrip().decode() + '#'
grid += '#' * W
 
def bfs(start):
    INF = 10 ** 9
    dist = [INF] * (H*W)
    dist[start] = 0
    q = deque([start])
    while q:
        v = q.popleft()
        dv = dist[v]
        for move in (-1,1,W,-W):
            w = v + move
            if grid[w] == '#':
                continue
            dw = dv + 1
            if dw >= dist[w]:
                continue
            dist[w] = dw
            q.append(w)
    return max(x for x in dist if x < INF)
 
answer = max(bfs(v) for v in range(H*W) if grid[v] != '#')
print(answer)
import sys
import random

def main():
    S = input()
    l = len(S)
    n = [random.randint(0, l) for i in range(3)]
    out = S[n[0]] + S[n[1]] + S[n[2]]
    
    print(out)
main()

### FIXED CODE ###

import sys
import random

def main():
    S = input()
    l = len(S)
    n = [0, 1, 2]
    out = S[n[0]] + S[n[1]] + S[n[2]]
    
    print(out)
main()
n, m = map(int, input().split())

graph = [[] for i in range(n)]

for i in range(m):
    a, b = map(int, input().split())
    graph[a-1].append(b-1)
    graph[b - 1].append(a - 1)

memo = [0 for i in range(n)]
color = [-1 for i in range(n)]
black = 0
white = 0
flag = 0


def search(v):
    for i in graph[v]:
        if memo[i] == 0:
            memo[i] = 1
            color[i] = (color[v] + 1) % 2
            if color[i] == 0:
                global black
                black += 1
            else:
                global white
                white += 1
            search(i)
        else:
            if color[v] == color[i]:
                global flag
                flag = 1

memo[0] = 1
color[0] = 0
black += 1
search(0)

if flag == 1:
    print(n*(n-1)//2 - m)
else:
    print(black * white - m)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
n, m = map(int, input().split())

graph = [[] for i in range(n)]

for i in range(m):
    a, b = map(int, input().split())
    graph[a-1].append(b-1)
    graph[b - 1].append(a - 1)

memo = [0 for i in range(n)]
color = [-1 for i in range(n)]
black = 0
white = 0
flag = 0


def search(v):
    for i in graph[v]:
        if memo[i] == 0:
            memo[i] = 1
            color[i] = (color[v] + 1) % 2
            if color[i] == 0:
                global black
                black += 1
            else:
                global white
                white += 1
            search(i)
        else:
            if color[v] == color[i]:
                global flag
                flag = 1

memo[0] = 1
color[0] = 0
black += 1
search(0)

if flag == 1:
    print(n*(n-1)//2 - m)
else:
    print(black * white - m)
import sys
s=input()
if("C" in s and "C" in s):
  if(s.index("C")<s.index("F")):
    print("Yes")
    sys.exit()
print("No")

### FIXED CODE ###

import sys
s=input()
if("C" in s and "F" in s):
  for i in range(len(s)):
    if(s[i]=="C"):
      c=i
      break
  for i in range(len(s))[::-1]:
    if(s[i]=="F"):
      f=i
      break
  if(c<f):
    print("Yes")
    sys.exit()
print("No")
from bisect import bisect_right
INFTY = 10**5
P = [1 for _ in range(INFTY)]
P[0]=0
P[1]=0
for i in range(2,int(INFTY**0.5)+1):
    for j in range(i*i,INFTY,i):
        P[j] = 0
Q = []
for i in range(INFTY):
    if P[i]==1:
        Q.append(i)
X = int(input())
ind = bisect_right(Q,X)
print(Q[ind])

### FIXED CODE ###

from bisect import bisect_left
INFTY = 10**5+10
P = [1 for _ in range(INFTY)]
P[0]=0
P[1]=0
for i in range(2,int(INFTY**0.5)+1):
    for j in range(i*i,INFTY,i):
        P[j] = 0
Q = []
for i in range(INFTY):
    if P[i]==1:
        Q.append(i)
X = int(input())
ind = bisect_left(Q,X)
print(Q[ind])
import fraction
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

N = int(input())
A = (input()).split()
# N = int('2')
# A = ('1000000000 1000000000').split()
A = [int(a) for a in A]
max=0

for i in range(N):
    B = A.copy()
    del B[i]
    for j in range(N-1):
        if max < gcd(*B):
            max = gcd(*B)
            
print(max)


### FIXED CODE ###

A_B_T = input()
A = int(A_B_T.split()[0])
B = int(A_B_T.split()[1])
T = int(A_B_T.split()[2])

print(int((T + 0.5) // A * B))
N,M=map(int,input().split())
ab=[[0]*M]*M
a=[0]*M
b=[0]*M

reached=[0]*M

for i in range(M):
  a[i],b[i]=map(int,input().split())
  ab[a[i]][b[i]]=1
  ab[b[i]][a[i]]=1
    
def rootCount(pos,N,reached):
  count=0
  prev=0
  for i in range(N):
    if ab[pos][i]==0:
      continue
    if reached[i]==1:
      continue
    reached[i]=1
    count+=rootCount(i,N,reached)
    reached[i]=0
  return(count)

reached[0]=1
count=rootCount(0,N,reached)
print(count)

### FIXED CODE ###

from itertools import permutations
N,M=map(int,input().split())
ab=[list(map(int,input().split())) for i in range(M)]
g=[[False]*N for i in range(N)]
for a,b in ab:
  g[a-1][b-1]=True
  g[b-1][a-1]=True
nodes=[i for i in range(1,N)]
ans=0
for route in permutations(nodes):
  if g[0][route[0]]== False:
    continue
  for i in range(N-1):
    if i == N-2:
      ans+=1
      
      break
    elif g[route[i]][route[i+1]]:
      continue
    else:
      break
print(ans)
from itertools import combinations_with_replacement
from math import floor

def f(N):
    global table
    for x, y, z in combinations_with_replacement(range(1, 100), 3):
        n = x**2+y**2+z**2+x*y+y*z+z*x
        if n>N+1:
            continue
        if x==y==z:
            table[n] = 1
        elif x==y or y==z or z==x:
            table[n] = 3
        else:
            table[n] = 6
N = int(input())
table = [0 for _ in range(N+1)]
f(N)
for n in range(1, N+1):
    print(table[n])

### FIXED CODE ###

from itertools import combinations_with_replacement
def f(N):
    global table
    for x, y, z in combinations_with_replacement(range(1, 100), 3):
        n = x**2+y**2+z**2+x*y+y*z+z*x
        if n>N:
            continue
        if x==y==z:
            table[n] += 1
        elif x==y or y==z or z==x:
            table[n] += 3
        else:
            table[n] += 6
N = int(input())
table = [0 for _ in range(N+1)]
f(N)
for n in range(1, N+1):
    print(table[n])
n, m = list(map(int, input().rstrip().split(" ")))
friendships = []
l = 0
for mm in range(m):
  a, b = list(map(int, input().rstrip().split(" ")))
  i_a = -1
  i_b = -1
  j_a = -1
  j_b = -1
  for ll in range(l):
    if a in friendships[ll]:
      j_a = friendships[ll].index(a)
      i_a = ll
      break
  for ll in range(l):
    if b in friendships[ll]:
      j_b = friendships[ll].index(b)
      i_b = ll
      break
  if i_a != -1 and i_b != -1:
    if i_a != i_b:
      fb_ls = friendships[i_b]
      for fb in fb_ls:
        friendships[i_a].append(fb)
        del friendships[i_b]
        l -= 1
  elif i_a != -1:
    friendships[i_a].append(b)
  elif i_b != -1:
    friendships[i_b].append(a)
  else:
    l += 1
    friendships.append([a, b])
print(max([len(friendship) for friendship in friendships]))

### FIXED CODE ###

def root(x, root_ls):
  if root_ls[x] < 0:
    return x
  else:
    root_ls[x] = root(root_ls[x], root_ls)
    return root_ls[x]

def unite(a, b, root_ls):
  a = root(a, root_ls)
  b = root(b, root_ls)
  if a != b:
    root_ls[a] += root_ls[b]
    root_ls[b] = a
  
n, m = list(map(int, input().rstrip().split(" ")))
members = [-1 for i in range(n)]
max_idx = 0
for mm in range(m):
  a, b = list(map(int, input().rstrip().split(" ")))
  unite(a-1, b-1, members)
print(max([-m for m in members]))
Day = {"SUN":7,
       "MON":6,
       "TUE":5,
       "WEN":4,
       "THU":3,
       "FRI":2,
       "SAT":1}

S = raw_input()

print Day[S]

### FIXED CODE ###

Day = {"SUN":7,
       "MON":6,
       "TUE":5,
       "WED":4,
       "THU":3,
       "FRI":2,
       "SAT":1}

S = raw_input()

print Day[S]
def kolorowe_grafy():
    N = wczytaj_liste()[0]
    lista_krawedzi = []
    listy_krawedzi = [[]]
    for i in range(N-1):
        lista_krawedzi.append(wczytaj_liste())
        listy_krawedzi.append([])
    for w1, w2 in lista_krawedzi: 
        listy_krawedzi[w1-1].append(w2)
        listy_krawedzi[w2-1].append(w1)
        
    do_przejrzenia = [1]
    kolory_zabronione = {1: 0}
    indeks_przegladanego = 0 
    kolor_tenczy = {}
    while indeks_przegladanego < len(do_przejrzenia): 
        aktualnie_przegladany = do_przejrzenia[indeks_przegladanego]
        kolor = 1
        if kolor == kolory_zabronione[aktualnie_przegladany]:
            kolor += 1
        for sasiad in listy_krawedzi[aktualnie_przegladany-1]: 
            if sasiad not in kolory_zabronione: 
                kolory_zabronione[sasiad] = kolor
                kolor_tenczy[(aktualnie_przegladany,sasiad)]=kolor
                kolor_tenczy[(sasiad,aktualnie_przegladany)]=kolor
                kolor += 1
                
                if kolor == kolory_zabronione[aktualnie_przegladany]:
                    kolor += 1
                do_przejrzenia.append(sasiad)
        indeks_przegladanego += 1
    maximum = 0
    for w1, w2 in lista_krawedzi:
        maximum = max(kolor_tenczy[(w1,w2)], maximum)
    print(maximum)
    for w1, w2 in lista_krawedzi:
        print(kolor_tenczy[(w1,w2)])
kolorowe_grafy()

### FIXED CODE ###

def wczytaj_liste(): 
    wczytana_lista = input()
    lista_znakow = wczytana_lista.split()
    ostateczna_lista = []
    for element in lista_znakow:
        ostateczna_lista.append(int(element))
    return ostateczna_lista

def kolorowe_grafy():
    N = wczytaj_liste()[0]
    lista_krawedzi = []
    listy_krawedzi = [[]]
    for i in range(N-1):
        lista_krawedzi.append(wczytaj_liste())
        listy_krawedzi.append([])
    for w1, w2 in lista_krawedzi: 
        listy_krawedzi[w1-1].append(w2)
        listy_krawedzi[w2-1].append(w1)
        
    do_przejrzenia = [1]
    kolory_zabronione = {1: 0}
    indeks_przegladanego = 0 
    kolor_tenczy = {}
    while indeks_przegladanego < len(do_przejrzenia): 
        aktualnie_przegladany = do_przejrzenia[indeks_przegladanego]
        kolor = 1
        if kolor == kolory_zabronione[aktualnie_przegladany]:
            kolor += 1
        for sasiad in listy_krawedzi[aktualnie_przegladany-1]: 
            if sasiad not in kolory_zabronione: 
                kolory_zabronione[sasiad] = kolor
                kolor_tenczy[(aktualnie_przegladany,sasiad)]=kolor
                kolor_tenczy[(sasiad,aktualnie_przegladany)]=kolor
                kolor += 1
                
                if kolor == kolory_zabronione[aktualnie_przegladany]:
                    kolor += 1
                do_przejrzenia.append(sasiad)
        indeks_przegladanego += 1
    maximum = 0
    for w1, w2 in lista_krawedzi:
        maximum = max(kolor_tenczy[(w1,w2)], maximum)
    print(maximum)
    for w1, w2 in lista_krawedzi:
        print(kolor_tenczy[(w1,w2)])

kolorowe_grafy()
K=int(input())
A,B=map(int,input().split())
flag=0    
for i in range(A,B,1):
    if i % K ==0:
       a=1 
        
if a==0:
   print("NG")
    
    
else:
  print("OK")

### FIXED CODE ###

K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")
import numpy as np
N = int(input())

ARR = []

for i in range(N):
    ARR.append([int(s) for s in input().split(" ")])

PRR = []

for i in range(N):
    PRR.append([int(s) for s in input().split(" ")])

def calculate(n, arr, prr):
    return []

result = calculate(N, ARR, PRR)
print(max(result))



### FIXED CODE ###

n = int(input())

frr = []

for i in range(n):
    frr.append([int(s) for s in input().split(" ")])

prr = []

for i in range(n):
    prr.append([int(s) for s in input().split(" ")])

# n = 2
#
# frr = [
#     [1, 1, 1, 1, 1, 0, 0, 0, 0, 0],
#     [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
# ]
#
# prr = [
#     [0, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1],
#     [0, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1]
# ]


res = []
for i in range(1,2 ** 10):
    count = [0 for s in range(n)]

    mask = []
    for j in range(10):
        m =  i >> j & 1
        mask.append(m)
        if m == 1:
            for k in range(n):
                if frr[k][j] == 1:
                    count[k] = count[k] + 1

    mm = []
    for index,c in enumerate(count):
        mm.append(prr[index][c])

    res.append(sum(mm))

print(max(res))
n,k = [int(i) for i in input().split()]
p = [int(i) for i in input().split()]
a = []
for i in range(len(c)-k):
  mx = c[i+k] - c[i]
  a.append(mx)
max_a = max(a)
ans = (max_a + k)/2
print(ans)



### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    N, K = map(int, input().split())
    P = list(map(int, input().split()))

    tmp_max = sum(P[:K])
    tmp = sum(P[:K])
    for i in range(N-K):
        tmp += P[i+K]
        tmp -= P[i]

        if tmp > tmp_max:
            tmp_max = tmp

    print((tmp_max + K) / 2)

main()
N = int(input())
M = int(input())

if N == M:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N,M = (int(x) for x in input().split())

if N == M:
  print("Yes")
else:
  print('No')
x,y,a,b,c=map(int,input().split())
p=sorted(list(map(int,input().split())))[-x:]
q=sorted(list(map(int,input().split())))[-y:]
r=sorted(list(map(int,input().split())))
for i in range(len(p)):
  r.append(p[i])
  r.append(q[i])
r=sorted(r)[-x-y:]
print(sum(r))



### FIXED CODE ###

x,y,a,b,c=map(int,input().split())
p=sorted(list(map(int,input().split())))[-x:]
q=sorted(list(map(int,input().split())))[-y:]
r=sorted(list(map(int,input().split())))
for i in range(len(p)):
  r.append(p[i])
for i in range(len(q)):
  r.append(q[i])
r=sorted(r)[-x-y:]
print(sum(r))
# メモ
# 連結無効グラフ　＝　全部が繋がっている

# N = int(input())
# D = list(map(int, input()))

N = int(input())
D = list(map(int, input().split()))

JOSU = 998244353

anser = 0

deep = [-1] * (N + 1)
deep[0] = 0
memo = [0] * N

# 各深さの数を求める
for i in range(N):
    if deep[D[i]] == -1:
        deep[D[i]] = 0
    deep[D[i]] += 1

def dfs(n, end, sum):
    if n == end:
        return sum
    elif deep[n] == -1 or deep[n + 1] == -1:
        return dfs(n + 1, end, sum)
    else:
        return dfs(n + 1, end, sum * deep[n] ** deep[n + 1])

print(dfs(0, N, 1) % JOSU)

### FIXED CODE ###

# 再帰関数の最大再帰回数を変更
import sys
sys.setrecursionlimit(1000000)

# 再帰関数で作る木の個数を返す
def dfs(now, end, summary):
    # 終了条件
    if now == end:
        return summary
    # 1つ前の頂点時点で作ることのできる木の個数 *（１つ前の深さの頂点の数 ^ 現在の深さの頂点の数）で再帰関数
    else:
        return dfs(now + 1, end, summary * (deep[now - 1] ** deep[now]))

# 最後に割る数の定数
JOSU = 998244353

# 入力
N = int(input())
D = list(map(int, input().split()))

# 深さをメモするため、Dの最大値 + 1の数の配列を用意
# 例：深さの最大が2なら、0, 1, 2の3つが必要
deep = [0] * (max(D) + 1)

# 各深さの頂点の数を記録
for i in range(N):

    # 頂点1が深さ0以外なら制約違反
    if i == 0 and D[i] != 0:
        print(0)
        exit()
    # 頂点1以外が深さ0なら制約違反
    elif i > 0 and D[i] == 0:
        print(0)
        exit()

    deep[D[i]] += 1

# 再帰関数で計算
print(dfs(1, len(deep), 1) % JOSU)
N = input()
n = sum(list(map(int,N)))
if(N%n == 0):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
digitSum = sum(list(map(int,str(N))))
if(N % digitSum == 0):
  print('Yes')
else:
  print('No')
import sys
input = sys.stdin.buffer.readline
import heapq
from collections import defaultdict
from operator import itemgetter

def main():
    N,K = map(int,input().split())
    sushi = []
    for _ in range(N):
        t,d = map(int,input().split())
        sushi.append((-d,t))
    sushi.sort(key=itemgetter(0))
    use,only,unuse = [],[],sushi[K:]
    neta = defaultdict(int)
    x = 0
    for i in range(K):
        d,t = sushi[i]
        if neta[t] == 0:
            only.append((-d,t))
        else:
            use.append((-d,t))
        neta[t] += 1
        x -= d
    
    l = len(neta)
    heapq.heapify(use)
    heapq.heapify(only)
    heapq.heapify(unuse)
    
    ans = x + l**2
    while (len(use) != 0 or len(unuse) != 0 or l < K):
        cd,ct = heapq.heappop(unuse)
        cd *= -1
        if neta[ct] != 0:
            continue
        heapq.heappush(only,(cd,ct))
        rd,rt = heapq.heappop(use)
        x += cd-rd
        l += 1
        neta[ct] += 1
        neta[rt] -= 1
        ans = max(ans,x+l**2)
        
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline
import heapq
from collections import defaultdict
from operator import itemgetter

def main():
    N,K = map(int,input().split())
    sushi = []
    for _ in range(N):
        t,d = map(int,input().split())
        sushi.append((-d,t))
    sushi.sort(key=itemgetter(0))
    use,only,unuse = [],[],sushi[K:]
    neta = defaultdict(int)
    x = 0
    for i in range(K):
        d,t = sushi[i]
        if neta[t] == 0:
            only.append((-d,t))
        else:
            use.append((-d,t))
        neta[t] += 1
        x -= d
    
    l = len(neta)
    heapq.heapify(use)
    heapq.heapify(only)
    heapq.heapify(unuse)
    
    ans = x + l**2
    while (len(use) != 0 and len(unuse) != 0 and l < K):
        cd,ct = heapq.heappop(unuse)
        cd *= -1
        if neta[ct] != 0:
            continue
        heapq.heappush(only,(cd,ct))
        rd,rt = heapq.heappop(use)
        x += cd-rd
        l += 1
        neta[ct] += 1
        neta[rt] -= 1
        ans = max(ans,x+l**2)
        
    print(ans)

if __name__ == "__main__":
    main()
a = int(input())
b = int(input())
k = int(input())
m = 0
o = 0


for n in range(0,100):
    if a%(100-n) == b%(100-n) == 0:
        m += 1
        o = 100-n
    if m == k:
        break


print(o)

### FIXED CODE ###

a,b,k = (int(x) for x in input().split())
m = 0
o = 0


for n in range(0,100):
    if a%(100-n) == b%(100-n) == 0:
        m += 1
        o = 100-n
    if m == k:
        break


print(o)
import math
from functools import reduce

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

#m = 最小公倍数 - 1
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

MaxKoubai = lcm_list(a)
m = MaxKoubai - 1
result = 0

for i in range(N):
    result += m % a[i]
    
print(result)

### FIXED CODE ###

import math
N = int(input())
A = list(map(int, input().split()))

answer = A[0]
Sum = 0

def gcd(A,B):
    if(B == 0):
        return A
    else:
        return gcd(B, A%B)

#最小公倍数-1がfに入る数なはず
for i in range(1, N):
    answer = answer * A[i] // gcd(answer, A[i])
    
for i in range(N):
    Sum += (answer-1) % A[i]

print(Sum)
N = int(input())
S = 0

for i in range(len(str(N))):
  S += int(str(S)[i])
  
if N % S == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = int(input())
S = 0

for i in range(len(str(N))):
  S += int(str(N)[i])
  
if N % S == 0:
  print('Yes')
else:
  print('No')
import numpy as np
n=int(input())

a= list(map(float,input().split()))
def calc_double(n):
    return n / 10
a2 = list(map(calc_double,a))
#print(a2)

ans=np.prod(a2)*10**n

if ans>10**(18) or ans<0:
    ans=-1
print(int(ans))

### FIXED CODE ###

import numpy as np
n=int(input())
ans=1
a=input().split()
#print(a)
if '0' in a:
    ans=0
    print(ans)
if ans!=0:
    for i in a:
        ans=ans*int(i)
        if ans>10**18:
            ans=-1
            break
    print(ans)
N = input() + 1
for val in range(1,N):
	branches = [[0] for x in range(0,10)]
	x = map(int,raw_input().split(' '))
	branches[0].append(x[0])
	branch_num = 1
	for l in range(2,10):
		small_num = 0
		for n in range(0,l):
			if branches[n][0] < x[]
				small_num += 1
		if small_num == 0:
			branches[l].insert[0,x[l]]
	branch_num = 0
	for val in range(0,10):
		if branches[val][0] == 0:
			branch_num += 1
	if blanch_num <= 2:
		print 'YES'
	else:
		print 'NO'

### FIXED CODE ###

N = input() + 1
for val in range(1,N):
	c = 0
	x = map(int,raw_input().split(' '))
	a = x[0]
	b = 0
	for n in range(1,10):
		if b > a:
			e = a
			d = b
			a = d
			b = e
		else:
			pass
		if a < x[n]:
			a = x[n]
		elif a > x[n] and b < x[n]:
			b = x[n]
		elif x[n] < b:
			c += 1
	if c == 0:
		print 'YES'
	else:
		print 'NO'
a,b = map(int,input().split())


print(int((b-a)*(b-a+1)/2-b))

### FIXED CODE ###

n = int(input())

m = 10000000000000000

for i in range(n,m,n):
	if i % 2 == 0:
		print(i)
		break
A,B,C,D = map(int,input().split())

def gcd(x,y):

    if(y>x):
        x,y = y,x
    if(x%y==0):
        return y
    else:return gcd(y,x%y)


def lcm(x,y):
    return x*y//gcd(x,y)


Bika = B - B//C -B//D + B//lcm(C,D)
Aika = A-1 - (A-1)//C -(A-1)//D + (A-1)//lcm(C,D)

print(Bika-Aika)


### FIXED CODE ###

pw = input()

if(pw[0]==pw[1] or pw[1]==pw[2] or pw[2] ==pw[3]):
    print("Bad")
    
else:
    print("Good")
L, R = map(int, input().split())

answer = 5000
for i in range(L, R+1):
    for j in range(i+1, R+1):
        if (i*j)%2019 < answer:
            answer = (i*j)%2019
print(answer

### FIXED CODE ###

import heapq

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

if R - L >= 2019:
    print(0)
else:
    answer = 5000
    for i in range(L, R + 1):
        for j in range(i + 1, R + 1):
            if (i * j) % 2019 < answer:
                answer = (i * j) % 2019
    print(answer)
a=int(input())
b=[int(input()) for i range(a)]
c=0
for i range(a):
  c=c+(b[i][1]-b[i][2])
print(c+a)

### FIXED CODE ###

a=int(input())
b=[input().split() for i in range(a)]
c=0
for i in range(a):
  c=c+(int(b[i][1])-int(b[i][0]))
print(c+a)
def main():
    x = int(input())

    n = int(x ** .2)
    if n ** 5 == x:
        print(n, 0)
        return
    
    for i in range(1, 100):
        n = int((x - i ** 5) ** .2)
        if n ** 5 == (x - i ** 5):
            print(i, -n)
            return
    
    for i in range(1, 10000):
        fif = x + i ** 5
        n = int(fif ** .2)
        if n ** 5 == fif:
            print(fif, i)
            return

main()


### FIXED CODE ###

def main():
    x = int(input())

    _n = int(x ** .2)
    for n in range(_n-2, _n+3):
        if n ** 5 == x:
            print(n, 0)
            return
    
    for i in range(1, 100):
        if x - i ** 5 < 0:
            continue
        _n = int((x - i ** 5) ** .2)
        for n in range(_n-2, _n+3):
            if n ** 5 == (x - i ** 5):
                print(i, -n)
                return
    
    for i in range(1, 1000):
        fif = x + i ** 5
        _n = int(fif ** .2)
        for n in range(_n-2, _n+3):
            if n ** 5 == fif:
                print(n, i)
                return

main()