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())

dist = abs(b - a)
mys = v - w

if mys * 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())
d=abs(a-b)
if d<=(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 = "NO" if abs(a-b) > (v-w)*t else "YES"
print(ans)

Submission status: Accepted

Solution code:
from collections import *
from math import *

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

Submission status: Accepted

Solution code:
oni_pos, oni_V = map(int, input().split())
nige_pos, nige_W = map(int, input().split())
T_s = int(input())

diff = abs(oni_pos - nige_pos)
d_V = oni_V - nige_W


if (oni_V == nige_W):
    print('NO')
    exit()

time = diff / d_V

if (d_V < 0):
    print('NO')
    exit()
    
if (time <= T_s):
    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())

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

Submission status: Accepted

Solution code:
# coding: utf-8

import math
import re
import numpy as np
import copy

S1 = input().split(" ")
A = int(S1[0])
V = int(S1[1])

S2 = input().split(" ")
B = int(S2[0])
W = int(S2[1])

T = int(input())

#距離
dist = abs(A-B)
#速さの差
speed = V - W
#フラグ
possible = False

if speed > 0:
    if dist / speed <= T:
        possible = True

if possible:
    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 V <= W:
    print("NO")
else:
    if abs(A - B) / (V - W) <= T:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a = input().split()
b = input().split()
t = input()

d = abs(int(a[0]) - int(b[0]))

if (int(a[1]) <= int(b[1])):
    print('NO')
else:
    sek = int(a[1]) - int(b[1])

    if d <= int(t)*sek:
        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:
  print('YES')
  exit()
if v<=w:
  print('NO')
  exit()

dx = abs(b-a)
dv = v-w
if dx/dv <= t:
  print('YES')
  exit()
print('NO')

Submission status: Accepted

Solution code:
import itertools
import copy
from collections import deque
import heapq
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if a < b:
    ax = a + v*t
    bx = b + w*t
    if ax >= bx:
        print("YES")
    else:
        print("NO")
else:
    ax = a - v*t
    bx = b - w*t
    if ax <= bx:
        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:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
print("YES" if abs(a-b) <= t*(v-w) else "NO")

Submission status: Accepted

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

dif = abs(b-a)
waru = v - w
if waru <= 0:
    print('NO')
    exit()
tmp = dif/waru
#print(tmp)
if tmp<=t:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,v,b,w,t = map(int,open(0).read().split())
if abs(a-b)-t*(v-w) <= 0:
  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()

V = v - w
R = abs(a-b)
if V*t >= R:
    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:
  D=A-B
else:
  D=B-A
if V<=W:
  print("NO")
elif (V-W)*T>=D:
  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) + w*t  - v*t <= 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 W>=V:
  print('NO')
else:
  key=abs(A-B)
  if key+W*T>V*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())

dif = abs(B-A)
velo = V-W
if velo <= 0:
  print("NO")
elif dif <= velo * 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())

def solve(a, v, b, w, t):
    if a == b:
        return 'YES'
    if v < w:
        return 'NO'
    if (v-w) * t >= abs(a-b):
        return 'YES'
    else:
        return 'NO'

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

Submission status: Accepted

Solution code:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product, combinations_with_replacement
import sys
import bisect
import string
import math
import time


def I(): return int(input())
def S(): return input()
def MI(): return map(int, input().split())
def MS(): return map(str, input().split())
def LI(): return [int(i) for i in input().split()]
def LI_(): return [int(i)-1 for i in input().split()]
def StoI(): return [ord(i)-97 for i in input()]
def ItoS(nn): return chr(nn+97)
def input(): return sys.stdin.readline().rstrip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def print_matrix(mat):
    for i in range(len(mat)):
        print(*['IINF' if v == IINF else "{:0=4}".format(v) for v in mat[i]])


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False
# show_flg = True


def main():
    A, V = MI()
    B, W = MI()
    T = I()
    diff = abs(A - B)
    v = (V - W) * T

    # print('v', v)
    # print(diff - v)

    if diff - v > 0:
        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 abs(B-A) - (V - W)*T <= 0:
    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())

diff = abs(A - B)
diff_v = V - W


def solve():
    if diff == 0:
        return "YES"
    if diff_v <= 0:
        return "NO"

    if diff/diff_v <= T:
        return "YES"
    else:
        return "NO"


print(solve())

Submission status: Accepted

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

d = abs(a-b)

if v*k >= d + w*k:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
l1= input().split(' ')
a= int(l1[0])
v= int(l1[1])
l2= input().split(' ')
b= int(l2[0])
w= int(l2[1])
t=int(input())

if w>=v:
	print('NO')
else:
	speed_diff= v-w
	distance_gained= speed_diff*t
	if distance_gained>= 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=float(input())
ab=abs(a-b)
vw=v-w
if vw<=0:
    print('NO')
else:
    tab=ab/vw
    if tab<=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):
    print("YES")
else:
    if(v<=w):
        print("NO")
    else:
        Leng = abs(a-b)
        canM = abs(v-w) * t
        if(canM >= Leng):
            print("YES")
        else:
            print("NO")

Submission status: Accepted

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

diff = abs(AV[0] - BW[0])
vdiff = AV[1] - BW[1]

if (vdiff <= 0):
    print("NO")
else:
    if (vdiff * T >= diff):
        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 ) / t <= v - w:
    print( "YES" )
else:
    print( "NO" )

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,datetime,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

a,v = inpl()
b,w = inpl()
t = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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


resolve()

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 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:
B,W = map(int,input().split())
A,V = map(int,input().split())
T = int(input())
if A < B:
    if A-V*T >= B-W*T:
        print('YES')
    else:
        print('NO')
elif A > B:
    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")
elif 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())

ans='NO'
if v-w==0:
  if a==b:
    ans='YES'
elif abs(a-b)/(v-w)>=0 and abs(a-b)/(v-w)<=t:
  ans='YES'

print(ans)

Submission status: Accepted

Solution code:
import sys

a, v = map(int, sys.stdin.readline().split())
b, w = map(int, sys.stdin.readline().split())
t = int(sys.stdin.readline())

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

Submission status: Accepted

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

T=int(input())

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

if(sa<=0):
    print('NO')
elif(sa<=haya*T):
    print('YES')
    exit()
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 or V-W > 0 and abs(A-B) <= T*(V-W):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys


def _i(): return int(sys.stdin.readline().strip())


def _ia(): return map(int, sys.stdin.readline().strip().split())


def main():
    a, v = _ia()
    b, w = _ia()
    t = _i()
    if a > b:
        ans = "YES" if a - (v-w) * t <= b else "NO"
    else:
        ans = "YES" if a + (v-w) * t >= b else "NO"

    return ans


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

if V <= W:
    print('NO')
    exit()
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 B < A:
    A, B = B, A

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

Submission status: Accepted

Solution code:
from decimal import *

l=list(map(int, input().split(' ')))
a=l[0]
v=l[1]
l=list(map(int, input().split(' ')))
b=l[0]
w=l[1]
s=int(input())
ans=True
if a>b:
    ans=Decimal(a)-Decimal(v*s)<=Decimal(b)-Decimal(w*s)
else:
    ans=Decimal(a)+Decimal(v*s)>=Decimal(b)+Decimal(w*s)
if ans:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    it = map(int, sys.stdin.read().split())
    A, V, B, W, T = next(it),next(it),next(it),next(it),next(it)

    y, n = "YES", "NO"
    if A == B:
        print(y)
        return
    if V <= W:
        print(n)
        return
    print(y if (A-B)**2  <= (T*(W-V))**2 else n)

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
a, v1 = map(int, input().split())
b, v2 = map(int, input().split())
t = int(input())
l = abs(a-b)
delta_v = v1-v2
if delta_v <= 0:
  print("NO")
  exit()

if delta_v * t >= 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())

distance=abs(b-a)
chase=(v-w)*t

if v<=w:
    print("NO")
else:
    if chase>=distance:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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


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) *t >= abs(b - a):
    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 :
    ans = "NO"
else:
    if abs(B-A) <= abs(V-W)*T:
        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())

distance = abs(A - B)
speed = V - W

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

t = distance // speed
if distance % speed == 0:
    if t <= T:
        print('YES')
    else:
        print('NO')
else:
    if t + 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())

ans = ""

if A < B:
    a = A + V * T
    b = B + W * T
    if a >= b:
        ans = "YES"
    else:
        ans = "NO"
else:
    a = A - V * T
    b = B - W * T
    if a <= b:
        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+v*t >= b+w*t and a-v*t <= b-w*t:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    dis = abs(B - A)
    if W >= V:
        print('NO')
        exit()
    dis_V = V - W
    time = dis // dis_V if dis % dis_V == 0 else (dis // dis_V) + 1
    
    if T >= time:
        print('YES')
    else:
        print('NO')



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 W >= V:
  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 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:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if W>=V:
    ind = "NO"
else:
    if abs(A-B)/(V-W)<=T:
        ind = "YES"
    else:
        ind = "NO"
print(ind)

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 v>w:
        if abs(a-b)<=t*(v-w):
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Submission status: Accepted

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


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

s = ""

if v - w <= 0:
    s = "NO"
else:
    if abs(a-b) // (v-w)  > t:
        s = "NO"
    elif abs(a-b) // (v-w)  == t and abs(a-b) % (v-w)  > 0:
        s = "NO"
    else:
        s = "YES"
    

print(s)

Submission status: Accepted

Solution code:
A , V = (int(a) for a in input().split())
B , W = (int(a) for a in input().split())
T = int(input())
d = abs(A-B)
c = V - W 
if d <= T * 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())
if abs(a-b) <= (v*t - w*t):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import math


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

if (v*T)-(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:
    x = abs(a - b)
    y = x / (v - w)
    if y <= 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 (V - W) * T >= abs(B - A):
    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())
dist=abs(A-B)
sp=V-W
if(sp*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())

if abs(a-b) <= (v-w)*t:
	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 w >= v:
    print("NO")
elif 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 V <= W:
  print("NO")
  exit()

dist = abs(A - B)
vel = abs(V - W)

if T * vel >= 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())

dif = abs(A - B)
spe = V - W

if spe <= 0 or dif > spe * T:
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
# coding: utf-8
#N = int(input())
A,V=map(int, input().split())
B,W=map(int, input().split())
T=int(input())

if V<=W:
    print("NO")
    quit()

SA=abs(A-B)
CHIJI=(V-W)
SA=SA-(CHIJI*T)
#print(SA)
    
if SA<=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 a<b:
    if a+v*t>=b+w*t:
        print("YES")
    else:
        print("NO")
elif a==b:
    print("YES")
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 a > b:
  a,b = b,a
m = 10**9
a+=m
b+=m
a+=v*t
b+=w*t
if a >= b:
  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())

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy


if __name__ == "__main__":
    a,v = map(int,input().split())
    b,w = map(int,input().split())
    t = int(input())
    d = abs(a-b)
    vt = v*t
    wt = w*t
    b = d + wt
    if vt >= b:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
e=int(input())
if abs(a-c)<=e*(b-d):
  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 T * (V-W) >= abs(A - B):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys, math
import io, os
#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
#from bisect import bisect_left as bl, bisect_right as br, insort
#from heapq import heapify, heappush, heappop
#from collections import defaultdict as dd, deque, Counter
#from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write(' '.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
#sys.setrecursionlimit(100000)
#INF = float('inf')
mod = 998244353
#from decimal import Decimal

a,v=mdata()
b,w=mdata()
t=int(data())
if a==b:
    out("YES")
elif a<b and a+v*t>=b+w*t:
    out("YES")
elif a>b and a-v*t<=b-w*t:
    out("YES")
else:
    out("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 + T * V
  b = B + T * W
  
else:
  b = A - T * V
  a = B - T * W
  
if b <= a:
  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())

dis = abs(a-b)

if dis == 0:
    print('YES')
    exit()

if w > v:
    print('NO')
    exit()

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    a, v = geta(int)
    b, w = geta(int)
    t = gete(int)

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


if __name__ == "__main__":
    main()

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<=0:
    print("NO")
elif d/(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(a-b) <= abs(t*(w-v)):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

    if V < W:
        print('NO')
        return

    if V == W:
        if A == B:
            print('YES')
        else:
            print('NO')
        return

    d = abs(A - B)
    dv = abs(V - W)

    if d <= dv * T:
        print('YES')
    else:
        print('NO')
    return


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

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

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 a > b:
    aa = a - t * v
    bb = b - t * w
    if aa > bb:
        print('NO')
    else:
        print('YES')
elif a < b:
    aa = a + t * v
    bb = b + t * w
    if aa < bb:
        print('NO')
    else:
        print('YES')
else:
    print('YES')

Submission status: Accepted

Solution code:
import sys
a,v  = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
kyori = abs(a - b)
tumari = v - w
if tumari <= 0:
    print('NO')

elif kyori / tumari <= 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 a + v * t >= b + w * t:
        print("YES")
    else:
        print("NO")
elif a > b:
    if a - v * t <= b - w * t:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,v=LI()
  b,w=LI()
  t=I()

  sa=abs(a-b)

  if sa-(v*t-w*t)<=0:
    return 'YES'

  return 'NO'

# main()
print(main())

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, speedA = map(int, input().split())
b, speedB = map(int, input().split())
t = int(input())
def do():
    if speedB >= speedA:
        print("NO")
        return 0

    d = abs(a - b)
    x = speedA - speedB
    #if d % x != 0:
    #    print("NO")
    #    return 0

    reachTime = d / x
    if reachTime <= t:
        print("YES")
        return 0
    else:
        print("NO")
        return 0
do()

Submission status: Accepted

Solution code:
R = lambda: map(int, input().split())
a, v = R()
b, w = R()
t, = R()
print('YNEOS'[abs(a-b)-(v-w)*t>0::2])

Submission status: Accepted

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

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

t = int(input())

d = abs(b-a)
if d <= (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:
    if A == B:
        print('YES')
        exit()
    else:
        print('NO')
        exit()
else:
    t = abs(A-B)/(V-W)
    if T >= 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 A + V * T < B + W * T:
    print('NO')
  else:
    print('YES')
else:
  if A - V * T > B - 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())
dist = V-W
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 v-w<=0:
  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 w-v>=0 :
  print('NO')
else :
  if abs(a-b)/(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 = 0

if  a < b:
    d = b - a
else:
    d = a - b

if d > (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 v<=w:
  print('NO')
  exit()
x=abs(a-b)
y=abs(v-w)
if t*y>=x:
  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:
  print('NO')
  exit()

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 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")