peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import numpy as np
X = np.array([list(map(int, input().split())) for _ in range(3)])
T = True
if X[0][0]-X[0][1]==X[1][0]-X[1][1]==X[2][0]-X[2][1]\
   and X[0][1]-X[0][2]==X[1][1]-X[1][2]==X[2][1]-X[2][2]:
    pass
else:
  T = False

X = X.T
if X[0][0]-X[0][1]==X[1][0]-X[1][1]==X[2][0]-X[2][1]\
   and X[0][1]-X[0][2]==X[1][1]-X[1][2]==X[2][1]-X[2][2]:
    pass
else:
  T = False
print("Yes" if T else "No")
# Judge status: Accepted
import fractions
# input
n = int(input())
A = [0] + [int(i) for i in input().split()] + [0]

# define
L = [0 for i in range(n+1)]
R = [0 for i in range(n+1)]
M = [0 for i in range(n)]

# main
for i in range(2, n+1):
  L[i] = fractions.gcd(L[i-1], A[i-1])
  R[n+1-i] = fractions.gcd(R[n+2-i], A[n+2-i])
  
for i in range(n):
  M[i] = fractions.gcd(L[i+1], R[i+1])

# output  
print(max(M))
# Judge status: Accepted
n,x= input().split()
b_list= list(map(int, input().split()))
temp = 0
counter = 1
for i in range(int(n)):
    temp += b_list[i]
    if (temp<=int(x)):
        counter +=1
    else:
        break

print(counter)
# Judge status: Wrong Answer
mn = input().split()
ob = input().split()

n = int(mn[0])
m = int(mn[1])

votes = 0

for i in range(len(ob)):
    ob[i] = int(ob[i])
    votes += ob[i]

ob.sort()

line = votes//(4*m)

ans = 0

for i in range(m):
    if ob[-1*(i+1)] < line:
        ans += 1

if ans == 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
def main():
    n, k = [int(x) for x in input().split()]
    scores = [int(x) for x in input().split()]

    for old, new in zip(scores, scores[k:]):
        if old < new:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input())
s = input()
t = input()
ans = 2*n
for i in range(n):
    check = True
    for j in range(n-i):
        if s[i+j] != t[j]:
            check = False
            break
    if check:
        ans = min(ans,i+n)
print(ans)
# Judge status: Accepted
#A - AtCoder Group Contest
N = int(input())
a = list(map(int,input().split()))
a = sorted(a,reverse = True)
a = a[1:-N:2]
print(sum(a))
# Judge status: Wrong Answer
import math

n=int(input())
A=list(map(int,input().split()))
A.sort()
m=10**6+10
C=[0]*m
C[0]=-1
ans=0
now=0
flag=0
for a in A:
    if now==a:
        flag=1
        continue
    if now!=a and flag:
        ans-=1
        flag=0
    now=a
    if C[a]==0:
        ans+=1
        j=a
        while j<m:
            C[j]=1
            j+=a
if flag:
    ans-=1
print(ans)
# Judge status: Wrong Answer
import sys

N = int(input())
s = [int(input()) for _ in range(N)]
ss = sum(s)
s.sort

if ss % 10 != 0:
    print(ss)
    sys.exit()

for p in s:
    if p % 10 != 0:
        print(ss - p)
        break
else:
    print(0)
# Judge status: Wrong Answer
n, m = map(int,input(). split())
answer = (n+m)*(n+m-1)/2 - n*m
print(answer)
# Judge status: Accepted
x,y,z=map(int,input().split())
ans=int(x/(y+z))
if x-ans*(y+z)>=z:
    print(ans)
else:
    print(ans-1)
# Judge status: Accepted
from math import ceil
from fractions import gcd

a, b = map(int, input().split())
c = gcd(a, b)
count = 1
for num in range(2, ceil(c**0.5) + 1):
  if c % num == 0:
    count += 1
    while c % num == 0:
      c = c // num
if c > 1:
  count += 1
print(count)
# Judge status: Wrong Answer
n = int(input())
h = list(map(int,input().split()))
table=set()
count = 0
for i in range(n):
  table.add(i+h[i])
  if i-h[i] in table:
    count+=1
print(count)
# Judge status: Accepted
n = int(input())

ans = 0
for a in range(1,n+1):
    k = n // a
    if n % a == 0:
        ans += k-1
    else:
        ans += k

print(ans)
# Judge status: Wrong Answer
S = input()

if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TRE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
elif S == "SAT":
    print(1)
# Judge status: Accepted
from math import ceil
N,K = map(int,input().split())
A = list(map(int,input().split()))
lb = 0
ub = max(A)
while True:
    X = (ub+lb)/2
    count = 0
    for i in range(N):
        count += ceil(A[i]/X-1)
    if count > K:
        lb = X
    else:
        ub = X
    if ceil(ub) == ceil(lb):
        print(ceil(ub))
        exit()
# Judge status: Wrong Answer
def main():
    n, x = map(int, input().split())
    x_lst = list(map(int, input().split()))

    minimum = abs(x_lst[0] - x)
    for i in range(n):
        distance = abs(x_lst[i] - x)
        minimum = min(minimum, distance)

    print(minimum)


if __name__ == '__main__':
    main()
# Judge status: Accepted
N,K = list(map(int,input().split()))
S = input()
if N == 1:
    print(0)
else:
    lc = max(S.count('L')-1,0)
    rc = max(N-lc-1,0)
    maxc = lc+rc
    nowc = 0
    now = S[0]
    for i in range(1,N):
        if S[i] == now:
            nowc += 1
        else:
            now = S[i]
    print(min(nowc+2*K,maxc))
# Judge status: Accepted
import math
n,x,t = map(int,input().split())
zz = math.ceil(n/x)
print(zz*t)
# Judge status: Accepted
a,b,c,x,y = map(int,input().split())

if a + b <= c * 2:
    print(a*x+b*y)
else:
    if x > y:
        print(min(x*2*c,y*2*c+(x-y)*a))
    else:
        print(min(y*2*c,x*2*c+(y-x)*b))
# Judge status: Accepted
s = input()
n = len(s)
top = s[:(n-1)//2]
under = s[(n+1)//2:]

if s==s[::-1] and top==top[::-1] and under==under[::-1]:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
from math import gcd
K=int(input())
k=[1,1,1]
g=0
for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      g+=gcd(gcd(a,b),c)
      
      
print(g)
# Judge status: Wrong Answer
import bisect

n = int(input())
L = sorted(map(int, input().split()))
ans = 0
for i in range(n-2):
    a = L[i]
    for j in range(i+1, n-1):
        b = L[j]
        l = bisect.bisect_left(L[j+1:n], a+b-1)
        ans += l
print(ans)
# Judge status: Accepted
a, b, x = [int(x) for x in input().split()]

cnt_a = (a-1) // x
cnt_b = b // x

print(cnt_b-cnt_a)
# Judge status: Accepted
# ABC 065: B – Trained?
n = int(input())
a = [int(input()) for _ in range(n)]

lightning = 0

for k in range(n):
    lightning = a[lightning] - 1

    if lightning == 1:
        print(k + 1)
        break
else:
    print(-1)
# Judge status: Accepted
n, k = map(int, input().split())
ans = []
count = 0

for i in range(k):
  d = int(input())
  l = list(map(int, input().split()))
  for j in range(d):
    if l[j] not in ans:
      ans.append(l[j])
  
print(n - len(ans))
# Judge status: Accepted
n,q=map(int,input().split())
s=input()
cnt=[0]*n
icnt=0
for i in range(n-1):
#    print(s[i:i+2])
    if s[i:i+2]=="AC":
      icnt=icnt+1
      cnt[i+1]=cnt[i]+1
    else:
      cnt[i+1]=cnt[i]
#print(cnt,s)
for i in range(q):
    li,ri=map(int,input().split())
#    print(s[li-1:ri].count("AC"))
#    print(sum(cnt[li-1:ri-1]))
    print(cnt[ri-1]-cnt[li-1])
# Judge status: Wrong Answer
a = int(input())
s = 'pink'
if a >= 3200:
    print(s)
else:
    print('red')
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = 0
before = -1
for i in a:
    i -= 1
    if i == before + 1:
        ans += c[before]
    before = i
    ans += b[i]
print(ans)
# Judge status: Accepted
N, A, B = map(int, input().split())
ans = 0

if A == 0:
    ans = 0
else:
    n = N // (A + B)
    mod = N % (A + B)
    if mod > A:
        mod = A
    ans = A * n + mod

print(ans)
# Judge status: Wrong Answer
a=int(input())
n=list(map(int,input().split()))
m=list(map(int,input().split()))
o=list(map(int,input().split()))
result1=0

for i in range(0,a-1):
    if n[i]+1==n[i+1]:
        print(i)
        result1+=o[n[i]-1]

for i in range(a):
    result1+=m[n[i]-1]
print(result1)
# Judge status: Accepted
N, K = map(int, input().split())
H = list(map(int, input().split()))
H.sort(reverse=True)
#print(H)
H = H[K:]
#print(H)

if H == []:
    print(0)
else:
    print(sum(H))
# Judge status: Wrong Answer
x = int(input())
 
if x % 11 == 0:
    ans = x // 11 * 2
else:
    if x / 11 < 1:
        if x // 6 > 1:
            ans = 2
        else:
            ans = 1
    else:
        ans = x // 11 * 2 + 1
 
print(ans)
# Judge status: Accepted
from collections import Counter

n=int(input())
s=[Counter(input()) for _ in range(n)]

c = s[0]
#各アルファベット(a,b,c,...,z)に対して，使用回数の最小値を求める
c = s[0]
for i in range(1,n):
    for k,v in c.items():
        c[k] = min(s[i][k], c[k])
        
c = sorted(c.items())
ans = ''
for k,v in c:
    ans += k*v
print(ans)
# Judge status: Accepted
k, s = map(int, input().split())

ans = 0

for x in range(k + 1):
    for y in range(k + 1):
        z = s - (x + y)
        if z >= 0 and z <= k:
            ans += 1

print(ans)
# Judge status: Wrong Answer
#基本全部1にする
import math
n,k = list(map(int, input().split()))
As = list(map(int,input().split()))
pos = As.index(1)
#print(pos)
pos_b = math.ceil((n-1-pos)/(k-1))
pos_f = math.ceil(pos/(k-1))
print(pos_b+pos_f)
# Judge status: Accepted
N_times_str=input()

N_times=int(N_times_str)

print(800*N_times-200*(N_times//15))
# Judge status: Accepted
import math
n,x,t = map(int,input().split())

num=0
while(num*x<n):
    num+=1

print(num*t)
# Judge status: Accepted
n,k = map(int, input().split())
if (n % k) >= 1:
    print(1)
else:
    print(0)
# Judge status: Accepted
def main():
    n, k = map(int, input().split())
    *h, = sorted(map(int, input().split()), reverse=True)
    print(sum(h[k:]))


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())
# Judge status: Accepted
def main():
    D, T, S = map(int, input().split())
    print('Yes') if T*S>=D else print('No')


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n,k = map(int,input().split())
s = input()
ans = s.count("RL") * 2
ans1 = 0
if s[0]=="L":
	ans1 += 1
if s[-1]=="R":
	ans1 += 1
while k > 0:
	if ans > 0:
		ans -= 2
	elif ans1 > 0:
		ans1 -= 1
	k -= 1
print(n - ans - ans1)
# Judge status: Accepted
n = int(input())
s = input()
a = s.count("R")*s.count("G")*s.count("B")
b = 0
for i in range(0,n-1):
  for j in range(i+1,n-1):
    k = 2*j-i
    if k<=n-1:
      if s[i]!=s[j] and s[k]!=s[j] and s[i]!=s[k] :
        b += 1
print(a-b)
# Judge status: Wrong Answer
N = int(input())
w = list(map(int,input().split()))

M = sum(w) // 2
i = 0
s1 = 0
s2 = w[0]
while s1 < M:
    s1 += w[i]
    i += 1
    s2 += w[i]

a = abs(sum(w)-s1-s1)
b = abs(sum(w)-s2-s2)

print(min(a,b))
# Judge status: Accepted
def Candles(n , k , xl):

    ans = 10**9

    for i in range(n - k + 1):
        lr = min(abs(xl[i]) + abs(xl[i] - xl[i + k - 1]) , abs(xl[i + k - 1]) + abs(xl[i + k - 1] - xl[i]))
        ans = min(ans , lr)

    return ans

def main():
    n , k = map(int , input().split())
    xl = list(map(int , input().split()))
    print(Candles(n , k , xl))

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
from collections import deque

S = deque(input().split())
Q = int(input())

AppendLeft = ""
AppendRight = ""
for i in range(Q):
    QList = list(input().split())
    
    if QList[0] == '1':
        S.appendleft(AppendLeft)
        S.append(AppendRight)
        S.reverse()
        AppendLeft = ""
        AppendRight = ""
    else:
        if QList[1] == '1':
            AppendLeft += QList[2]
        else:
            AppendRight += QList[2]
print("".join(list(S)))
# Judge status: Wrong Answer
import functools
import operator

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

count = int(input())
list = list(map(int, input().split()))
sum = prod(list)

if sum >= 1000000000000000000:
    sum = -1

print(sum)
# Judge status: Accepted
n, k = map(int,input().split())
dat = list(map(int, input().split()))
i = dat.index(1) + 1 # 1originでi個目に1がある
import math

b1 = k # 今1で占有した場所
a1 = 1 # 1にたどり着くまでに必要な個数
a2 = 0
if b1 < i: # もし、iがいまよりも手前にあるなら
    a2 += math.ceil( (i - k) / (k - 1) )
b1 += a2 * (k - 1)
b1 = n if b1 > n else b1 # 1のターンでたどり着いた場所
a3 = math.ceil((n - b1) / (k - 1))
print(a1+a2+a3)
# Judge status: Accepted
n,a,b = map(int,input().split())

c = a*(n-1) + b
d = a + b*(n-1)

print(max(d-c+1, 0))
# Judge status: Accepted
S = input()

if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")
# Judge status: Accepted
from itertools import accumulate
n = int(input())
a = list(map(int, input().split()))
MOD = 10**9+7
ac = list(accumulate(a))

ans = 0
for i in range(n-1):
    ans += (ac[i]*a[i+1])
    ans %= MOD
print(ans)
# Judge status: Wrong Answer
h,w = map(int,input().split())
if h==1 or w ==1:
  print(0)
  exit()
ans = h * w
if ans %2 == 0:
  print(ans // 2)
else:
  print(ans // 2 + 1)
# Judge status: Accepted
s = input()

lis = []
for i in s:
    lis.append(i)
    
tmp = list(set(lis))

if len(tmp) == 2 and lis.count(tmp[0]) == 2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
a = int(input())
b = int(input())
h = int(input())

ans = (a+b)*h / 2

print(int(ans))
# Judge status: Accepted
n = int(input())
a = 111
for _ in range(9):
    if n <= a:
        print(a)
        exit()
    a += 111
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = [0]*n
for i in range(n):
    b1=b[n-1-i::n-1-i+1]
    su=sum(b1)
    if (a[n-1-i]==0 and su%2==0) or (a[n-1-i]==1 and su%2==1):
        b[n-1-i]=0
    else:
        b[n-1-i]=1
ans =[]
print(sum(b))
for i in range(n):
    if b[i]==1:
        ans.append(str(i+1))
print(' '.join(ans))
# Judge status: Wrong Answer
n=int(input())
k=int(input())
print(6-n+k)
# Judge status: Wrong Answer
n,m = map(int,input().split())
m += n*2
print(m//4)
# Judge status: Wrong Answer
import sys
def input():
  return sys.stdin.readline()#[:-1]

def main():
  s = input()
  res = 0
  for i in range(len(s)//2):
    if s[i] != s[-(i+1)]:
      res += 1
  print(res)
    
if __name__ == '__main__':
  main()
# Judge status: Wrong Answer
h, n = map(int, input().split())

a = []
b = []

for i in range(n):
    tmp1, tmp2 = map(int, input().split())
    a.append(tmp1)
    b.append(tmp2)

dp = [pow(10, 10)] * (h + 1)
dp[0] = 0

for k in range(n):
    for j in range(h):
        next_index = min(j + a[k], h)
        dp[next_index] = min(dp[next_index], dp[h] + b[k])

print(dp[h])
# Judge status: Wrong Answer
n=int(input())
A=list(map(int,input().split()))

num=A[0]
for i in range(1,n):
    num |=A[i]

B=[]
for i,j in enumerate(format(num,"b")):
    B.append(int(j)*2**i)
print(*B)
# Judge status: Accepted
s=list(input())
t=list(input())
s.sort()
t.sort(reverse=True)
s_=str()
t_=str()
for i in range(len(s)):
    s_+=s[i]
for j in range(len(t)):
    t_+=t[j]
    
dic=[s_,t_]
dic.sort()
print("Yes" if dic[0]==s_ and s!=t else "No")
# Judge status: Accepted
#!/usr/bin/env python
def main():
    A, B, K = map(int, input().split())
    cnt = 0
    for i in reversed(range(1, 101)):
        if A % i == 0 and B % i == 0:
            cnt += 1
            if cnt == K:
                print(i)
                exit()

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import sys
from collections import defaultdict
from collections import deque

n, m = map(int, input().split())

graph = defaultdict(list)

for _ in range(m):
    a, b = map(lambda x: int(x), input().split())
    graph[a].append(b)
    graph[b].append(a)

q = deque([1])
cnt = 0

while q:
    if cnt > 2:
        break
    node = q.popleft()
    after = graph[node]

    for a in after:
        if a == n:
            print("POSSIBLE")
            sys.exit()
        q.append(a)
    cnt += 1

print("IMPOSSIBLE")
# Judge status: Accepted
n = int(input())
s = input()
t = input()

a = 0
ti = 1
for i in range(n - 1, -1, -1):
    if s[i:] == t[:ti]:
        a = ti
    ti += 1
print(2 * n - a)
# Judge status: Accepted
n, k = map(int,input().split())
h = [int(input()) for i in range(n)]
h.sort(reverse=True)

seed = h[0]
for i in range(0,n-k+1):
    high = h[i] - h[i+k-1]
    seed = min(high,seed)

print(seed)
# Judge status: Wrong Answer
from collections import*
s=input()

c=Counter(s)

if (c["S"]==0 and c["N"]>0) or (c["S"]==0 and c["N"]>0) or (c["E"]==0 and c["W"]>0) or (c["W"]==0 and c["E"]>0):
    print("No")
else:
    print("Yes")
# Judge status: Accepted
a, b, c, d = map(int, input().split())
print(max(0, min(b, d) - max(a, c)))
# Judge status: Accepted
n = int(input())
rest = 0
res = 0
for i in range(1, n + 1):
    a = int(input())
    if a == 0:
        rest = 0
    else:
        res += (rest + a) // 2
        rest = (rest + a) % 2
print(res)
# Judge status: Wrong Answer
d = [int(input()) for i in range(5)]
k = int(input())
ans = 'Yey!'
for i in d:
    for j in d:
        if abs(i-j)>k:
            ans = ':('
print(ans)
# Judge status: Accepted
n = int(input())
s = [input() for _ in range(n)]
az = "abcdefghijklmnopqrstuvwxyz"
counts = {}

for v in az:
    counts[v] = 10**9
    for i in range(n):
        counts[v] = min(counts[v], s[i].count(v))

ans = ""
for k, v in sorted(counts.items()):
    ans += k*v
print(ans)
# Judge status: Wrong Answer
N = int(input())
S = input()

count1 = 0
count2 = 0
flag = False

for index, s in enumerate(S):
  if s == '(':
    flag = True
    count1 += 1

  if flag and s == ')':
    count2 += 1

  if not flag:
    continue

if count1 > count2:
  S += ')' * (count1 - count2)

count1 = 0
count2 = 0
flag = False

for index, s in enumerate(S[::-1]):
  if s == ')':
    flag = True
    count1 += 1

  if flag and s == '(':
    count2 += 1

  if not flag:
    continue

if count1 > count2:
  S = '(' * (count1 - count2) + S

print(S)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))

mod=10**9+7

ans=0
for i in range(60):
  on=0
  off=0
  for j in a:
    if (j>>i)&1:
      on+=1
    else:
      off+=1
  ans+=(on*off)*(2**i)
  ans%=mod

print(ans)
# Judge status: Accepted
n,m = map(int,input().split())
if n*2 <= m:
  m += n*2
  print(m//4)
else:
  print(m//2)
# Judge status: Accepted
S = list(input())

S[0] = '2'
S[1] = '0'
S[2] = '1'
S[3] = '8'

print(''.join(S))
# Judge status: Accepted
n = input()
if '7' in n:
    print("Yes")
else :
    print("No")
# Judge status: Accepted
import heapq
 
n = int(input())
a = [int(input()) for _ in range(n)]
m1, m2 = heapq.nlargest(2, a)
for ai in a:
  print(m1 if ai != m1 else m2)
# Judge status: Accepted
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
list = [list(map(int, input().split())) for x in range(m)]
list.sort(key=lambda x: x[1], reverse=True) # １番の要素で降順ソート

app_count = 0
for i in list:
    a += [i[1]]*i[0]
    app_count += i[0]
    if app_count>n:
        break

a.sort(reverse=True)

print(sum(a[:n]))
# Judge status: Wrong Answer
#!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

def main():
    A, B, C = map(int, input().split())
    if A < C < B:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
s = input()
x = len(s)
y = 0
z = 0
a = x - 1
while(y <= x):
  if (s[y] == "A"):
    z = y
    break
  y += 1
while(y <= x):
  if (s[a]  == "Z"):
    print(str(a - z))
    break
  a -= 1
  y += 1
# Judge status: Accepted
import bisect
from collections import deque

N = int(input())
A = [int(input()) for _ in range(N)]
dq = deque([A[0]])

for i in range(1, len(A)):
    idx = bisect.bisect_left(dq, A[i])
    if idx == 0:
        dq.appendleft(A[i])
    else:
        dq[idx - 1] = A[i]

print(len(dq))
# Judge status: Accepted
N = int(input())

S_dict = dict()

for i in range(N):
    S = str(input())
    if S not in S_dict:
        S_dict[S] = 1
    else:
        S_dict[S] += 1

score_S_list = sorted(S_dict.items(), key=lambda x:x[1] ,reverse=True)

max_polled = score_S_list[0][1]

max_polled_S = list()

for S in score_S_list:
    if S[1] == max_polled:
        max_polled_S.append(S[0])
    else:
        break
        
max_polled_S.sort()

for S in max_polled_S:
    print(S)
# Judge status: Accepted
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
MOD = 10**9+7

lcm = 1
for a in A:
    lcm = lcm * a // gcd(lcm,a)

ans = 0
for a in A:
    ans += lcm // a
ans %= MOD
print(ans)
# Judge status: Accepted
N=int(input())
a=[]
b=[]
for _ in range(N):
    A,B=map(int,input().split())
    a.append(A)
    b.append(B)
a=sorted(a)
b=sorted(b)
if N%2==1:
    print(b[N//2]-a[N//2]+1)
else:
    print(int(((b[N//2-1]+b[N//2])/2-(a[N//2-1]+a[N//2])/2)*2+1))
# Judge status: Accepted
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

dif = abs(B-A)
velo = V-W
if velo <= 0:
  print("NO")
elif dif <= velo * T:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
def solve():
    if s[-1] == "3":
        print("bon")
    elif s[-1] in "0168":
        print("pon")
    else:
        print("hon")
    return

#n, m = [int(ii) for ii in raw_input().split()]
s = raw_input()
# Judge status: Accepted
N = int(input())
d = sorted(list(map(int, input().split())))

print(d[N//2] - d[N//2 - 1])
# Judge status: Wrong Answer
c = input()
vowellist = ["a","i","u","e","o"]
for w in vowellist:
    if c == w:
        print("vowel")
        break
    else:
        print("consonant")
        break
# Judge status: Accepted
n, h = map(int, input().split())
a, b = [], []
for _ in range(n):
    ai, bi = map(int, input().split())
    a.append(ai), b.append(bi)
a.sort(), b.sort()

ans, amax = 0, a[-1]
for bi in b[::-1]:
    if bi <= amax or h<=0:
        break
    h -= bi
    ans += 1
print(ans + ((h + amax - 1) // amax) * (h > 0))
# Judge status: Accepted
# coding:utf-8
s = input()
n = len(s)
for i in range(n):
    if s[:i] + s[n-7+i:] == 'keyence':
        print('YES')
        exit()
print('NO')
# Judge status: Accepted
n, k = map(int, input().split())
s = input()

see = s[0]
cnt = 0
cluster = 1
for i in range(1, n):
    if see == s[i]:
        cnt += 1
    else:
        see = s[i]
        cluster += 1

for i in range(k):
    if cluster > 2:
        cluster -= 1
        cnt += 2
    else:
        print(n - 1)
        exit()
print(min(cnt, n - 1))
# Judge status: Wrong Answer
S = input()

odd = set()
odd.add(S[-1])
for i in range(len(S) - 2, -1, -1):
    if (S[i] in odd):
        odd.remove(S[i])
    else:
        odd.add(S[i])
    if len(odd) == 0:
        print(i)
        break
# Judge status: Wrong Answer
n, x, y = map(int, input().split())

ans = [0]*(n+1)
for i in range(1,n+1):
  for j in range(i+1, n+1):
    d = min(abs(i-j), abs(y-j)+abs(x-i)+1, abs(y-i)+abs(x-j)+1)
    ans[d] += 1

for a in ans[1:]:
  print(a)
# Judge status: Accepted
n, x, y = map(int, input().split())

ans = [0] * (n + 1)
for i in range(1, n):
    for j in range(i + 1, n + 1):
        sub = min(abs(j - i), abs(x - i) + 1 + abs(j - y), abs(y - i) + 1 + abs(j - x))
        ans[sub] += 1

for i in range(1, n):
    print(ans[i])
# Judge status: Accepted
n = int(input())
arr = [list(map(int,input().split())) for _ in range(2)]
ans = 0
for i in range(n):
    ans = max(ans, sum(arr[0][:i+1] + arr[1][i:]))
else:
    print(ans)
# Judge status: Accepted
n,m = map(int, input().split())

if n == 1 and m == 1: print(1)
elif n != 1 and m == 1: print(n-2)
elif n == 1 and m != 1: print(m-2)
else: print((n-2)*(m-2))
# Judge status: Wrong Answer
a, b = map(int, input().split())
 
tap_num = 0
con_num = a + (a * tap_num -1)
 
# con_num > b となることが必要条件
# a + (a * tap_num -2) < b < a + (a * tap_num -1)
 
for tap_num in range(b):
    if a + (a * tap_num -1) >= b:
        break
    
print(tap_num)
# Judge status: Accepted
s = input()
t = input()

for _ in range(len(s)):
    if s == t:
        print('Yes')
        exit()
    t = t[-1] + t[:-1]
print('No')
# Judge status: Accepted
import queue

q = queue.Queue()
K = int(input())

for i in range(1, 10):
    q.put(i)

ans = 0
for i in range(K):
    ans = q.get()
    if ans % 10 != 0:
        q.put(ans * 10 + (ans % 10) - 1)

    q.put(ans * 10 + (ans % 10))

    if ans % 10 != 9:
        q.put(ans * 10 + (ans % 10) + 1)


print(ans)
# Judge status: Accepted

S = input()

for i in range(len(S)):
    # 0オリジン[偶数]
    if i % 2 == 0:
        if S[i] not in ['R', 'U', 'D']:
            print("No")
            exit()
    else:
        if S[i] not in ['L', 'U', 'D']:
            print("No")
            exit()
print("Yes")