Problem:


Score : 200 points

Problem Statement

Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second.
The other child is now at coordinate B, and she can travel the distance of W per second.

He can catch her when his coordinate is the same as hers.
Determine whether he can catch her within T seconds (including exactly T seconds later).
We assume that both children move optimally.

Constraints

-10^9 \leq A,B \leq 10^9

1 \leq V,W \leq 10^9

1 \leq  T \leq 10^9

A \neq B

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A V
B W
T

Output

If "it" can catch the other child, print YES; otherwise, print NO.

Sample Input 1

1 2
3 1
3

Sample Output 1

YES

Sample Input 2

1 2
3 2
3

Sample Output 2

NO

Sample Input 3

1 2
3 3
3

Sample Output 3

NO



Sample input:
1 2
3 1
3


Sample output:
YES

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w = map(int,input().split())
t=int(input())


if a<=b:

    dist_a = a + t*v

    dist_b = b + t*w

    if dist_a>=dist_b:
        print('YES')
    else:
        print('NO')
else:

    dist_a = a - t*v

    dist_b = b - t*w

    if dist_a<=dist_b:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if(v <= w):
    print('NO')
elif((v-w)*t < abs(a-b)):
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())


if (a*b) < 0:
    child = max(a,b) - min(a,b)
else:
    child = abs(b-a)

mother = v-w
if mother <= 0:
    print('NO')
    exit()

n = child/mother
if n>0 and n<=t:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
num_input = [input() for i in range(3)]
a = int(num_input[0].split()[0])
v = int(num_input[0].split()[1])
b = int(num_input[1].split()[0])
w = int(num_input[1].split()[1])
t = int(num_input[2].split()[0])

hoge=b-a
if hoge<0:
    hoge=hoge*-1

if v-w<=0:
    ans="NO"
elif t*(v-w)>=hoge:
    ans="YES"
else:
    ans="NO"
    
print(ans)

Submission status: Accepted

Solution code:
from decimal import *
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
getcontext().prec=20
if A==B:
    print("YES")
elif A<B:
    if (V>W):
        if 0<=B-A<=T*(V-W):
            print("YES")
        else:
            print("NO")
    elif (V<=W):
        print("NO")
else:   #A>B
    if V>W:
        if 0<=A-B<=T*(V-W):
            print("YES")
        else:
            print("NO")
    elif (V<=W):
        print("NO")

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
#from collections import deque,defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,v = readInts()
b,w = readInts()
t = I()
ab = abs(a-b)
sa = abs(w - v)
if sa == 0:
    print('NO')
    exit()
if a == b:
    print('YES')
elif a < b and v <= w:
    print('NO')
elif a > b and v <= w:
    print('NO')
elif ab/sa <= t:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

kyori = abs(A-B)
sa =abs(V-W)

if V<=W:
  print('NO')
else:
  if kyori <= sa*T:
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
if a<b:
    new_a = a + v*t
    new_b = b + w*t
    if new_a >= new_b:
        print("YES")
    elif new_a < new_b:
        print("NO")
elif a>b:
    new_a = a - v*t
    new_b = b - w*t
    if new_a <= new_b:
        print("YES")
    elif new_a > new_b: 
        print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

if v<=w:
    print("NO")
else:
    if abs(b-a)<=t*(v-w):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, V = map(int, readline().split())
B, W = map(int, readline().split())
T = int(readline())
if W >= V:
  print('NO')
  sys.exit()
if (abs(A-B)/(V-W)) <= T: 
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
v,w=map(int,input().split())
t=int(input())
if a<=v:
    d1 = a + t*b
    d2 = v + t*w
    if d1>=d2:
        print('YES')
    else:
        print('NO')
else:
    d1 = a - t*b
    d2 = v - t*w
    if d1<=d2:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a, v = list(map(int, input().split()))
b, w = list(map(int, input().split()))
t = int(input())

if v != w:
  if b - a > 0:
    dt = (b - a) / (v - w)
    print( "YES" if 0 < dt and dt <= t else "NO")
  else:
    dt = (b - a) / (w - v)
    print( "YES" if 0 < dt and dt <= t else "NO")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if( t*v >= t*w + abs(a-b)):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    l =abs(a - b)
    s=abs(v - w)

    if w >= v or l / s > t:
        print("NO")
    else:
        print("YES")

Submission status: Accepted

Solution code:
def onigokko():
    A,V = map(int, input().split())
    B,W = map(int, input().split())
    T = int(input())
    
    if B < A:
        swap = A
        A = B
        B = swap
    
    tikaduku = V - W
    
    # 遠ざかったらアウト
    if tikaduku < 1:
        return 'NO'
    
    kyori = B - A
    
    if kyori <= tikaduku * T:
        return 'YES'
    
    return 'NO'

print(onigokko())

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T=int(input())

ans = "NO"

if(A<B):
    if(A+V*T >= B+W*T):
        ans = "YES"
elif(A>B):
    if(A+(-1)*V*T <= B+(-1)*W*T):
        ans = "YES"
print(ans)

Submission status: Accepted

Solution code:
a,v=map(int,input(). split())
b,w = map(int,input(). split())
t=int(input())


if a<=b:

    dist_a = a + t*v

    dist_b = b + t*w

    if dist_a>=dist_b:
        print('YES')
    else:
        print('NO')
else:

    dist_a = a - t*v

    dist_b = b - t*w

    if dist_a<=dist_b:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline

def main():
    A,V = map(int,input().split())
    B,W = map(int,input().split())
    T = int(input())
    
    if A < B:
        if W >= V:
            print("NO")
            exit()
        Areach = A + V*T
        Breach = B + W*T
        if Areach < Breach:
            print("NO")
        else:
            print("YES")
    else:
        if W >= V:
            print("NO")
            exit()
        Areach = A - V*T
        Breach = B - W*T
        if Breach < Areach:
            print("NO")
        else:
            print("YES")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if v<=w:
    print("NO")
    exit()
if a<b:
    a+=(v*t)
    b+=(w*t)
    if a>=b:
       print("YES")
       exit()
    print("NO")
    exit()
else:
    a-=(v*t)
    b-=(w*t)
    if a<=b:
        print("YES")
        exit()
    print("NO")
    exit()

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
flag=0
ky=abs(a-b)
if b==a:
    flag=1
elif w>=v:
    pass
elif abs((b-a)/(v-w))<=t:
    flag=1
if flag==1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if V - W <= 0:
    print("NO")
elif abs(A - B) / (V - W) <= T:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

if w>=v:
    print("NO")
else:
    V=v-w
    X=abs(a-b)
    if X/V<=t:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
dif = abs(a-b)
if (v-w)*t >= dif:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int, input().split())
t = int(input())

dis = abs(b - a) - ( v - w) * t
if dis <= 0:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

if abs(b-a)<= (v-w)*t:
    print ("YES")

else:
    print("NO")

Submission status: Accepted

Solution code:
A, V = map(int,input().split())
B, W = map(int,input().split())
T = int(input())
ans = "YES"
if(V<=W):
  ans = "NO"
elif(abs(A-B)>T*abs(V-W)):
  ans = "NO"
print(ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
e=int(input())

n=abs(c-a)
m=b-d
if m<=0:
    print('NO')
elif e>=n/m:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

dis = abs(A-B)
v = V-W

if v > 0 and dis/v <= T:
  	print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if a >= b:
    if v <= w:
        print("NO")
    else:
        print("YES" if abs(v-w)*t >= abs(a-b) else "NO")
else:
    if v <= w:
        print("NO")
    else:
        print("YES" if abs(v-w)*t >= abs(a-b) else "NO")

Submission status: Accepted

Solution code:
def aaa(a,v,b,w,t):
  if v <= w:
    return False
  if abs(b-a) / (v-w) <= t:
    return True
  return False
  

a, v  = map(int, input().split())
b, w  = map(int, input().split())
t = int(input())

ret = "YES" if aaa(a,v,b,w,t) else "NO"
print(ret)

Submission status: Accepted

Solution code:
AV = list(map(int,input().split()))
BW = list(map(int,input().split()))
T = int(input())

A = AV[0]
V = AV[1]
B = BW[0]
W = BW[1]

pos_A = A
pos_B = B

if A <= B:
    pos_B = B + T*W
    pos_A = A + T*V
    if pos_A >= pos_B:
        print('YES')
    else:
        print('NO')
else:
    pos_B = B - T*W
    pos_A = A - T*V
    if pos_A <= pos_B:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

if (A < B) :
    end_A = A + V * T
    end_B = B + W * T
    if (end_B <= end_A) :
        print("YES")
    else :
        print("NO")
else :
    end_A = A - V * T
    end_B = B - W * T
    if(end_A <= end_B) :
        print("YES")
    else :
        print("NO")

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
ans = ["YES","NO"]

distance = abs(b-a)
speed = v-w

result = distance - speed * t
if result <= 0:
    print(ans[0])
elif result > 0:
    print(ans[1])

Submission status: Accepted

Solution code:
A, V = map(int,input().split())
B, W = map(int,input().split())
T = int(input())
if W >= V:
  print('NO')
elif abs(B-A)/(V-W) <= T:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T=int(input())
if (V-W)<=0:
    print('NO')
else:
    if (V-W)*T>=abs(A-B):
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())

if V <= W:
  print("NO")
else:
  if abs(A-B)/(V-W) <= T:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

Solution code:
A,V = map(int, input().split())
B,W = map(int, input().split())
T = int(input())

if abs(A-B) <= V*T-W*T:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

behind = abs(B - A)
move = V - W

if behind <= move * T:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
  print('NO')
  exit(0)
if abs(a-b)%(v-w) == 0:
  f = abs(a-b)//(v-w)
else:
  f = abs(a-b)//(v-w)+1
if f <= t:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t = int(input())

flag = 0
if v > w and a<b:
    if a+v*t >= b+w*t:
        flag = 1
elif v > w and a>b:
    if a-v*t <= b-w*t:
        flag = 1
    

if flag ==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys

a,v =map(int,input().split())
b,w =map(int,input().split())
t =int(input())
 
if a==b:
    print('YES')
    sys.exit()
if a<b:
    w=abs(w)
    v=abs(v)
    if (a+v*t)>=(b+w*t):
        print('YES')
        sys.exit()
    else:
        print('NO')
else:
    w=(abs(w)*(-1))
    v=(abs(v)*(-1))
    if (a+v*t)<=(b+w*t):
        print('YES')
        sys.exit()
    else:
        print('NO')

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

def main():
    a, v = list(map(int,sys.stdin.readline().split()))
    b, w = list(map(int,sys.stdin.readline().split()))
    t = int(sys.stdin.readline())
    dist = abs(a - b)
    if v <= w:
        print('NO')
        return 0

    vw = v - w
    if vw * t >= dist:
        print('YES')
    else: print('NO')


    return 0

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
[a, v] = map(int, input().split(' '))
[b, w] = map(int, input().split(' '))
t = int(input())
b0 = b - a
if (abs(b0) + t * w) <= t * v:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a, v = [int(i) for i in input().split()]
b, w = [int(i) for i in input().split()]
t = int(input())
if a<b:
  print("YES") if a+(v*t) >= b+(w*t) else print("NO")
else:
  print("YES") if a-(v*t) <= b-(w*t) else print("NO")

Submission status: Accepted

Solution code:
A,V = [int(v) for v in input().split()]
B,W = [int(v) for v in input().split()]
T = int(input())

if A > B:
    V *= -1
    W *= -1

A_d = V * T + A
B_d = W * T + B

if A < B:
    if A_d >= B_d: 
        print("YES")
    else:
        print("NO")
elif A > B:
    if A_d <= B_d: 
        print("YES")
    else:
        print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())

if A<B:
    if A+T*V>=B+T*W:
        print('YES')
    else:
        print('NO')

elif B<A:
    if -1*T*V+A<=-1*T*W+B:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
def solve():
	posA, speedA = map(int, input().split())
	posB, speedB = map(int, input().split())
	T = int(input())
	if posA < posB:
		if posA + speedA * T >= posB + speedB * T:
			return "YES"
	else:
		if posA - speedA * T <= posB - speedB * T:
			return "YES"
	return "NO"

def main():
	print(solve())


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

X = abs(B-A)
Y = V-W

if Y <= 0:
    print('NO')
    exit()

if Y == 0:
    print('NO')
else:
    if Y*T >= X:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

tiji = abs(W-V)
kyori = abs(A-B)

migiiku = False
tukamae = False
if B>A:
    migiiku=True

if W>=V and A!=B:
    print('NO')
elif T*tiji < kyori:
    print('NO')
else:
    for i in range(1,T+1):
        if migiiku:
            A +=V
            B +=W
        else:
            A -= V
            B -= W
        
        if A==B:
            tukamae = True
            break
    
    if tukamae:
        print('YES')
    else:
        print('YES')

Submission status: Accepted

Solution code:
a, v = map(int,input().split())
b, w = map(int,input().split())
t = int(input())

# print(a,v)
# print(b,w)
# print(t)

if a <= b:
    if a + v * t >= (b + w * t):
        print('YES')
    else:
        print('NO')
else:
    if a - v * t <= (b - w * t):
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if W >= V:
    print("NO")
else:    
    L = abs(B - A)
    if T * (V - W) >= L :
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a, v = map(int,input().split())

b, w = map(int,input().split())

t = int(input())

if (v <= w):
    print("NO")
else:
    dist = abs(a - b)
    if dist - (v - w) * t > 0:
        print("NO")
    else:
        print("YES")

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())

c = abs(b-a)
x = v - w


if x <= 0:
    print("NO")
    exit()

if c <= x * t:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A,V=map(int, input().split())
B,W=map(int, input().split())
T=int(input())

if A>B and A-V*T<=B-W*T:
  print("YES")
elif  A<B and A+V*T>=B+W*T:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 21:30:21 2020

@author: NEC-PCuser
"""


A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())


dis = abs(A - B)
soutai_v = V - W

if dis == 0:
    print("YES")
elif soutai_v <= 0:
    print("NO")
else:
    amari = dis % soutai_v
    shou = dis // soutai_v

    if shou > T or (shou == T and amari != 0):
        print("NO")
    else:
        print("YES")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
oa=0
ob=0
flag=True
if(a<b):
    a=a+v*t
    b=b+w*t
    if(b<=a):
        flag=True
    else:
        flag=False
else:
    a=a-v*t
    b=b-w*t
    if(a<=b):
        flag=True
    else:
        flag=False
print("YES" if flag else "NO")

Submission status: Accepted

Solution code:
[A,V]=[int(i) for i in input().split()]
[B,W]=[int(i) for i in input().split()]
T=int(input())
if W-V>0 or abs(B-A)>T*abs(W-V):print("NO")
else:print("YES")

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())

if abs(A-B)+W*T<=V*T:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
avl=input().split()
bwl=input().split()
t=int(input())
a=int(avl[0])
v=int(avl[1])
b=int(bwl[0])
w=int(bwl[1])

dist=b-a
if(dist<0):
    dist=-dist
spd=v-w
if(spd*t>=dist):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A,V = map(int, input().split())

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

T=int(input())

kyori=abs(B-A)
idousa=V-W

if idousa>0:
  if T>=kyori/idousa:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

if a>b>=0:
  if a-v*t<=b-w*t:
    print("YES")
  else:
    print("NO")
elif b>a>=0:
  if v*t+a>=w*t+b:
    print("YES")
  else:
    print("NO")
elif a>=0 and b<0:
  if a-v*t<=b-w*t:
    print("YES")
  else:
    print("NO")  
elif a<0 and b>=0:
  if a+v*t>=b+w*t:
    print("YES")
  else:
    print("NO")  
elif a<b<=0:
  if a+v*t>=b+w*t:
    print("YES")
  else:
    print("NO")  
elif b<a<=0:
  if a-v*t<=b-w*t:
    print("YES")
  else:
    print("NO")
elif a==b:
  print("YES")

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v - w <= 0:
    print('NO')
    exit()

if abs(a-b) <= abs(w-v) * t:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A,V=map(int, input().split())
B,W=map(int, input().split())
T=int(input())

if W>=V:
    print('NO')
    exit(0)

if A*B<0:
    if (abs(A)+abs(B))/(V-W)<=T:
        print('YES')
    else:
        print('NO')
else:
    if abs(abs(A)-abs(B))/(V-W)<=T:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a, v = map(int,input().split())
b, w = map(int,input().split())
T = int(input())

if a<b:
    A = a + v * T
    B = b + w * T
    if A>= B:
        print("YES")
    else:
        print("NO")
else:
    A = a - v*T
    B = b - w * T
    if A <= B:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
  print('NO')
else:
  if (v-w)*t >= abs(a-b):
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
import sys
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())

if v<=w:
    print("NO")
    sys.exit()

if a<b:
    if a+t*v>=b+t*w:
        print("YES")
    else:
        print("NO")
else:
    if a-t*v<=b-t*w:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())

    if abs(a-b) <= (v-w)*t:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

if abs(B-A)<=(V-W)*T:
  print('YES')
  
else:
  print('NO')

Submission status: Accepted

Solution code:
a, v = map(int,input().split())
b, w = map(int, input().split())
t = int(input())


if w >= v:
    print("NO")
else:
    if abs(b-a) > (v-w) * t:
        print("NO")
    else:
        print("YES")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

if a==b:
    print("YES")
else:
    if w>=v:
        print("NO")
    else:
        if  abs(a-b)/(v-w)<=t:
            print("YES")
        else:
            print("NO")

Submission status: Accepted

Solution code:
A, S_A = map(int, input().split(' '))
B, S_B = map(int, input().split(' '))
T = int(input())

if A < B:
    is_catchable = S_A * T + A >= S_B * T + B
else:
    is_catchable = -1 * S_A * T + A <= -1 * S_B * T + B

if is_catchable:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

diff = abs(a - b)
move = (v - w) * t

if diff <= move:
    ans = "YES"
else:
    ans = "NO"

print(ans)

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())


if A < B:
    A_sum = A + (V * T)
    B_sum = B + (W * T)
    if A_sum >= B_sum:
        print('YES')
    else:
        print('NO')

else:
    A_sum = A - (V * T)
    B_sum = B - (W * T)
    if A_sum <= B_sum:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
import sys
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if B - A == 0:
  print('YES')
  sys.exit()
elif B - A > 0:
  if (B + (W * T)) - (A + (V * T)) <= 0:
    print('YES')
  else:
    print('NO')
else:
  if (B - (W * T)) - (A - (V * T)) >= 0:
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
n = list(map(int,input().split()))
m = list(map(int,input().split()))
k = int(input())

if n[0] < m[0]:
    if n[0] + n[1] * k >= m[0] + m[1] * k:
        print("YES")
        exit()
elif n[0] > m[0]:
    if n[0] - n[1] * k <= m[0] - m[1] * k:
        print("YES")
        exit()

print("NO")

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
s = abs(b-a)
if (v-w) * t >= s:
  print("YES")
else:
  print('NO')

Submission status: Accepted

Solution code:
#2問目
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
idouA = 0
idouB = 0
kankaku = 0

#逃げる方が大きかったら確実に捕まえられない
if W >= V:
    print("NO")
else:
    idouA = V * T
    idouB = W * T
    if A < B:
        if A < 0 and B < 0:
            kankaku = abs(A) - abs(B)
        elif A >= 0 and B >= 0:
            kankaku = abs(B) - abs(A)
        elif A <= 0 and B >= 0:
            kankaku = B - A
    elif B < A:
        if A < 0 and B < 0:
            kankaku = abs(B) - abs(A)
        elif A >= 0 and B >= 0:
            kankaku = abs(A) - abs(B)
        elif A >= 0 and B <= 0:
            kankaku = A - B
            
    if(idouB + kankaku <= idouA):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a, v = map(int,input().split())
b, w = map(int,input().split())
t =int(input())

s = abs(b-a)
y = (v-w)

if y <= 0:
    print('NO')
else:
    m = s % y
    u = s //y
    if m == 0 and u <= t:
            print('YES')
    elif m != 0 and u + 1 <= t:
            print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a, v = map(int,input().split())
b, w = map(int,input().split())
t = int(input())
d = abs(b-a)
s = v-w
#print(d,s)
if a == b:print("YES")
elif (s*t != 0) and d <= (s*t):print("YES")
else:print("NO")

Submission status: Accepted

Solution code:
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007
a,v1=iia()
b,v2=iia()
t=ii1()
if a<b:
    if a+t*v1>=b+t*v2:
        print('YES')
    else:
        print('NO')
else:
    if b-t*v2>=a-t*v1:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a, v= map(int, input().split())
b, w= map(int, input().split())
t = int(input())
l = abs(b-a)
s = v-w
print('YES' if l<=s*t else 'NO')

Submission status: Accepted

Solution code:
import math
A, V = map(int, input().split())  
B, W = map(int, input().split())  
T=int(input())
if  B>A:
    kyo=B-A
if A>B:
    kyo=A-B

sub=V-W
wari=0
if sub!=0 and sub>0:
    wari=math.ceil(kyo/sub)
if wari<=T and wari!=0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if V <= W:
  f = False
else:
  t = abs(B - A) / (V - W)
  if t <= T:
    f = True
  else:
    f = False

print("YES" if f else "NO")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
# 文字列の入力
#s = input()
#開業されたN個要素を受け付ける
#input_list = [list(map(int, input().split())) for i in range(N)]

#print()

ans = "NO"
t=0

if W<V:
    if (abs(A-B) / (V-W)) <= T:
        ans = "YES"



print(ans)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
c,d=map(int, input().split())    
e = int(input())
if d-b>=0 :
    print('NO')
elif b-d>0:
    if c-a>0:
      if e*(b-d)>=(c-a):
        print('YES')
      else:
        print('NO')
    elif a-c>0:
      if e*(b-d)>=(a-c):
        print('YES')
      else:
        print('NO')

Submission status: Accepted

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
d = abs(a-b)
s = v - w
if s > 0 and d/s <= t:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if abs(B-A)>(V-W)*T:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
A, V=map(int,input().split())
B, W=map(int,input().split())
T =int(input())
D = abs(A-B)

if (V-W)*T>=D:
  print("YES")
#elif 10**9-A<=V*T and A<B:
#  print("YES")
#elif abs(-10**9-A)<=V*T and A>B:
#  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if abs(A-B) <= T*(V-W):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if B>=A:
    print("YES" if A+V*T>=B+W*T else "NO")
else:
    print("YES" if B-W*T>=A-V*T else "NO")

Submission status: Accepted

Solution code:
from decimal import *
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()
    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

def solve(A, B, V, W, T):
    if A<B:
        la = A+V*T
        lb = B+W*T
        return la>=lb
    else:
        la = A-V*T
        lb = B-W*T
        return la<=lb





A, V = rrm()
B, W = rrm()
T = rri()
ans = solve(A, B, V, W, T)
if ans:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,v = list(map(int,input().split()))
b,w = list(map(int,input().split()))
t = int(input())

import sys
dis = abs(a-b)
tume = v-w 
if v <= w:
  print("NO")
  sys.exit()

if dis%tume == 0 and dis//tume <= t:
  print("YES")
elif dis <= (t-1)*tume:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
r=abs(a-b)
if v<=w:
 print("NO")
else:
 if r%(v-w)==0:
  if (r/(v-w))<=t:
   print("YES")
  else:
   print("NO")
 else:
  if (r//(v-w))<=t-1:
   print("YES")
  else:
   print("NO")

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
j = list(map(int, input().split()))
t = int(input())
ans = "NO"
if i[0] > j[0]: # 鬼が右側にいるとき
  i[1] = i[0] - t * i[1]
  j[1] = j[0] - t * j[1]
  if i[1] <= j[1]:
    ans = "YES"
elif i[0] < j[0]: # 鬼が左側にいるとき
  i[1] = i[0] + t * i[1]
  j[1] = j[0] + t * j[1]
  if i[1] >= j[1]:
    ans = "YES"
else:
    ans = "YES"

print(ans)

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
# print(a,v)
# print(b,w)
# print(t)

dl = abs(a-b)
dv = v-w # 鬼のほうが速い？＋
# print(dl,dv)
if dl == 0:
    print('YES')
else:
    if dv > 0:
        # print(dl//dv)
        if (dl+dv-1)//abs(dv) <= t:
        # if dl//dv <= t:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if T * (V - W) >= abs(A - B):
    print('YES')
else:
    print('NO')