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

ans = 'NO'

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

Submission status: Accepted

Solution code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
import collections
import math
import itertools
gcd = math.gcd
a,v = ma()
b,w = ma()
t = ni()
if w>=v:
    print("NO")
    exit()
d = abs(a-b)
if d + w*t <=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())

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")
MOD = 1000000007


# 処理内容
def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

    if V == W:
        print("NO")
        return
        
    if A < B:
        t = (B-A)/(V-W)
    else:
        t = (A-B)/(V-W)
    
    if 0 < t and t <= 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())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(A: int, V: int, B: int, W: int, T: int):
    if V<=W:
        print(NO)
        return

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

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    V = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    T = int(next(tokens))  # type: int
    solve(A, V, B, W, T)

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

Submission status: Accepted

Solution code:
A,V,B,W,T = map(int, open(0).read().split())
d = V - W
if d <= 0:
    print('NO')
else:
    if d * 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:
    print('YES')
    exit()
if b - a > 0:
    if (v - w) * t >= b - a:
        print('YES')
        exit()
    else:
        print('NO')
        exit()
else:
    if (v - w) * t >= a - b:
        print('YES')
        exit()
    else:
        print('NO')
        exit()

print('NO')

Submission status: Accepted

Solution code:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(sys.stdin.readline())
def ria(): return list(map(int, sys.stdin.readline().split()))
def ws(s): sys.stdout.write(s + '\n')
def wi(n): sys.stdout.write(str(n) + '\n')
def wia(a): sys.stdout.write(' '.join([str(x) for x in a]) + '\n')


def main():
    a, v = ria()
    b, w = ria()
    t = ri()

    if a == b:
        ws('YES')
        return

    if v <= w:
        ws('NO')
        return

    tt = abs(b - a) / (v - w)
    if tt <= t:
        ws('YES')
    else:
        ws('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 >= 0 :
    C = A - B
else:
    C = B - A
X = V - W
Z = T * X
if C - Z > 0:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
'''     ##     ##  #######  # #  ######
        ##     ##  ##   ##  ###    ##
        ##     ##  ##    #  # #    ##
        #########  #######  # #    ##    '''

import sys
import math
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())

def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")
def printchk(*args): return print(*args, end=" \ ")

MODPRIME = int(1e9+7); BABYMODPR = 998244353;

ONLINE_JUDGE = 1
if not ONLINE_JUDGE:
    sys.stdin = open("input.txt","r")  # <<<  Comment this line  >>> #
    sys.stdout = open("output.txt","w")  # <<<  Comment this line  >>> #
    sys.stderr = open("output.txt","w")  # <<<  Comment this line  >>> #

a, v = get_ints()
b, w = get_ints()
t = int(input())
if a < b:
    f1 = a + (v*t)
    f2 = b + (w*t)
else:
    f2 = a - (v * t)
    f1 = b - (w * t)
if f2 > f1:
    print("NO")
else:
    print("YES")

# for _testcases_ in range(int(input())):

'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS BY ME @luctivud ( UDIT GUPTA )
SOME PARTS OF THE CODE HAS BEEN TAKEN FROM WEBSITES LIKE::
(I Own the code if no link is provided here or I may have missed mentioning it)
DO NOT PLAGIARISE.
TESTCASES:
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Accepted

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

a_mini = a-t*v
a_maxi = a+t*v
b_mini = b-t*w
b_maxi = b+t*w
if (a_mini <= b_mini <= a_maxi) and (a_mini <= b_maxi <= a_maxi):
    print('YES')
    
else:
    print('NO')

Submission status: Accepted

Solution code:
# tokiomarine2020_b.py
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 = A+T*V
    B = B+T*W
    if A>=B:
        print('YES')
        exit()
else:
    A = A-T*V
    B = B-T*W
    if A<=B:
        print('YES')
        exit()
print("NO")

Submission status: Accepted

Solution code:
# 幅優先探索（行きがけ）
import collections
import sys


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    A, V = LI()
    B, W = LI()
    T = I()

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


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")
else:
    f = abs(a-b)/(v-w)
    if f<=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())

judge = (abs(A - B) - T * (V - W) <= 0)

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
import io,sys
sys.setrecursionlimit(10**6)


def main():
    a,v = map(int,sys.stdin.readline().rstrip().split())
    b,w = map(int,sys.stdin.readline().rstrip().split())
    t = int(input())

    l = abs(a-b)
    p = v-w

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

Submission status: Accepted

Solution code:
def main():

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

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


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

# 捕まらない
if w - v >= 0:
    print('NO')
elif 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 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())
distance=abs(b-a)
speed=v-w
if distance>speed*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(b - a)
u = v - w
x = u * t

print(['NO', 'YES'][x >= d])

Submission status: Accepted

Solution code:
A,V = map(int, input().split())
B,W = map(int, input().split())
T = int(input())
val1 = A + V*T
val2 = B + W*T
val3 = A - V*T
val4 = B - W*T
if A == B:
    print('YES')
elif A > B:
    if val3 <= val4:
        print('YES')
    else:
        print('NO')
elif A < B:
    if val1 >= val2:
        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 or 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())

L = abs(A - B)
S = V - W
if S * 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())
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 - 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:
import sys
import os
import itertools
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

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

    if T*W+abs(A-B)<=T*V:
        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")
  exit()

print("YES" if max(a-b,b-a)/(v-w)<=t else "NO")

Submission status: Accepted

Solution code:

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def solve():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    if V-W >0 and abs(A-B)/(V-W) <= T:
        return 'YES'
    return 'NO'

if __name__ == '__main__':
    print(solve())

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 = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

kyori = abs(a-b)
sokudo = (v-w)

if sokudo > 0:
    if (kyori/sokudo)<=t:
        print("YES")
        exit()
elif sokudo == 0:
    if kyori == 0:
        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())

syoki = abs(a-b)
r = (v-w)*t

if syoki - r <= 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:
    a_max = A + V*T
    b_max = B + W*T
    if a_max >= b_max:
        print('YES')
    else:
        print('NO')
else:
    a_min = A - V*T
    b_min = B - W*T
    if a_min <= b_min:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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


if __name__ == '__main__':
    resolve()

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) <= abs(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())
sou=V-W
dis=abs(A-B)
if sou*T>=dis:
  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")

Submission status: Accepted

Solution code:
A, V = [int(s) for s in input().split()]
B, W = [int(s) for s in input().split()]
T = int(input())
dist = abs(A - B)
speed = V - W
if speed * 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(a==b):
    print('YES')
elif(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 a < b:
    A_dis = a + v*t
    B_dis = b + w*t
    if A_dis >= B_dis:
        print('YES')
    else:
        print('NO')
else:
    A_dis = a - v*t
    B_dis = b - w*t
    if A_dis <= B_dis:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

    tar = (V - W) * T
    diff = abs(B - A)

    res = 'NO'

    if tar > 0:
        if tar >= diff:
            res = 'YES'


    print(res)



main()

Submission status: Accepted

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

x = t * (v - w)
if abs(b - a) <= 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())
if w >= v:
    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 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())

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 = list(map(int,input().split()))
B,W = list(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")

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

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

solve()

Submission status: Accepted

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

dist = abs(a - b)

if dist == 0:
    print("YES")
    exit()

speed = v - w

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

able = t * speed

if dist <= able:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    dist = abs(a - b)
    sokudo = v - w
    if sokudo <= 0:
        print("NO")
    else:
        T = dist / sokudo
        print("YES" if T <= t else "NO")


if __name__ == '__main__':
    resolve()

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 W >= V:
  print("NO")
else:
  oni = V*T - W*T
  if oni >= 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())

if (v-w)*t >= abs(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())

diff = abs(a-b)
V = v-w
if V <= 0:
    print('NO')
else:
    if diff<=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):
  oni = A + V*T
  chi = B + W*T
  if(oni>=chi):
    print('YES')
  else:
    print('NO')
else:
  oni = B + V*T
  chi = A + W*T
  if(oni>=chi):
    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(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())
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())
ans = "NO"
if A < B:
  x = A + V * T
  y = B + W * T
  if x >= y:
    ans = "YES"
else:
  x = A - V * T
  y = B - W * T
  if x <= y:
    ans = "YES"
print(ans)

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

A, V = rl()
B, W = rl()
T = ri()

if A <= B:
	if B+W*T <= A+V*T:
		print('YES')
	else:
		print('NO')
else:
	if B-W*T >= A-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())

cap_a=v*t
cap_b=w*t+abs(b-a)

if cap_b>cap_a:
    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):
    ansa=a+(v*t)
    ansb=b+(w*t)
    if(ansa>=ansb):
        print('YES')
    else:
        print('NO')
else:
    ansa=a-(v*t)
    ansb=b-(w*t)
    if(ansa<=ansb):
        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 a < b:
    if a + v * t >= b + w * t:
        ans = "YES"
else:
    if b - w * t >= a - v * 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())

al, ar = A + -(T * V), A + (T * V)
bl, br = B + -(T * W), B + (T * W)

ans = "NO"
if A < B:
    if ar >= br:
        ans = "YES"
elif B < A:
    if al <= bl:
        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())

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def input_one_number():
    return int(input())

def input_multiple_number():
    return map(int, input().split())

def input_multiple_number_as_list():
    return list(map(int, input().split()))


A , V = input_multiple_number()
B, W = input_multiple_number()
T = input_one_number()

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

if D - v*T > 0 :
	print("NO")
else:
	print("YES")

Submission status: Accepted

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

print('YES' if abs(A - B) <= (V - W) * 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 a == b:
    print('YES')
    exit(0)

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

if (v - w) * t >= abs(a - b) and abs(a - b) % math.gcd(v, w) == 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    A,V=pin()
    B,W=pin()
    T,=pin()
    c=B-A

    if W==V:
        print("NO")
        return
    if c>0:
        t=c/(V-W)
        #print(t)
        if T>=t and t>0:
            print("YES")
        else:print("NO")
    else:
        t=c/(V-W)
        t*=-1
        #print(t)
        if T>=t and t>0:
            print("YES")
        else:print("NO")
#%%submit!
resolve()

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 t*(v-w) >= 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 abs(B-A) <= 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())
dist = abs(a-b)
nige = t*w
ou = t*v
if dist+nige <= ou:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
def main():
    a, v = [int(x) for x in input().split()]
    b, w = [int(x) for x in input().split()]
    t = int(input())
    distance = abs(b - a)
    closing = v - w
    try:
        need = distance / closing
    except ZeroDivisionError:
        if distance == 0:
            need = 0
        else:
            need = 10 ** 9 + 10

    if 0 <= need <= t:
        print('YES')
    else:
        print('NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline()[:-1]

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

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

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
#R=10**9
#L=(-1)*(10**9)
T=int(input())

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

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    a, v = i_map()
    b, w = i_map()
    t = i_input()



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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main1():
    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")

main1()

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 (distance <= speed * 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):
    one = a - t * v
    two = b - t * w
    if (one <= two):
        print('YES')
    else:
        print('NO')

else:
    one = a + t * v
    two = b + t * w
    if (one >= two):
        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
x = a+v*t
y = b+w*t
if x<y:
    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())
dis=abs(a-b)
if(a==b):
    print('YES')
elif(v<=w):
    print('NO')
else:
    vel=v-w
    if(dis>vel*t):
        print('NO')
    else:
        print('YES')

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    can_A = V * T
    can_B = W * T
    if A < B:
        B += can_B
        A += can_A
        if A >= B:
            print('YES')
        else:
            print('NO')
    else:
        B -= can_B
        A -= can_A
        if A <= B:
            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:
  ans="NO"
else:
  if (V-W)*T>=abs(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())

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