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: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
ca = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]
t = int(input())

if (a[0]<b[0]) & (b[1]*t + (b[0]-a[0]) - a[1]*t) < 0:
    print("YES")
elif (a[0]>b[0]) & (b[1]*t + (a[0]-b[0]) - a[1]*t) < 0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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")
if A>=B:

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

oni = a + (v*t)
child = b + (w*t)

if oni = child:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from sys import stdin
A,V = [int(x) for x in stdin.readline().rstrip().split()]
B,W = [int(x) for x in stdin.readline().rstrip().split()]
T = int(stdin.readline().rstrip())

if A >= B and W >= V:
    X = W - V
    C = A - B
    if C % X == 0:
        if X*T >= C:
            print("YES")
        else:
            print("NO")
                
    else:
        print("NO")
        
elif B >= A and V >= W:
    X = V-W
    C = B-A
    if C % X == 0:
        if X*T >= C:
            print("YES")
        else:
            print("NO")
                
    else:
        print("NO")

else:
    print("NO")

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=int(input())
i=0
d=int(a[0])
e=int(a[1])
f=int(b[0])
g=int(b[1])
while i<c:
    d=d+(e*i)
    f=f+(g*i)
    i=i+1
if f>d:
    print('NO')
else:
    print('YES')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
oni_x, oni_speed = map(int, input().split())
chi_x, chi_speed = map(int, input().split())
time = int(input())
ans = False


if oni_speed > chi_speed:
    sa = abs(oni_x, chi_x)
    sa_speed = oni_speed - chi_speed
    if sa_speed*time >= sa:
        ans = True

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
v = int(input())
b = int(input())
w = int(input())
t = int(input())
a += t * v;
b += t * w;
if (a < b):
  print("NO")
else:
  print("YES")

Submission status: Runtime Error

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 X >= y:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if abs(A-B) < abs(W-V)*T:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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: Runtime Error

Solution code:
a = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]
t = int(input())

if (a[0]<b[0]) .and. (b[1]*t + (b[0]-a[0]) - a[1]*t) < 0:
    print("YES")
elif:if (a[0]>b[0]) .and. (b[1]*t + (b[0]-a[0]) - a[1]*t) > 0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

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


resolve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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 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: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
flag = False
for t in range(T+1)
    if (B+W*T==A+V*T):
        flag = True
if flag:
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

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

if V!=W and  abs(A-B)/(V-W) <= T:
    ans = "YES"
elif A==B:
    ans = "YES"
elif A!=B and V==W:
    ans ="NO"
print(ans)

Submission status: Runtime Error

Solution code:
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 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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

lange = abs(A - B)
s = V - W

res = 0

if (s > 0):
    if (lange / s >= T):
        res = 1


if (res == 0):
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=int(input())
i=0
d=int(a[0])
e=int(a[1])
f=int(b[0])
g=int(b[1])
while i<c:
    d=d+e
    f=f+g
    i=i+1
if f>d:
    print('NO')
else:
    print('YES')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

x=b-a
y=v-w

if y*t>x and x%y==0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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 (b-a)%(v-w)==0:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

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: Runtime Error

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

if a>b:
  muki=-1
else:
  muki=1

at=a+v*muki*t
bt=b+w*muki*t

if muki:
  if at>=bt:
    print("YES")
  else:
    print("NO")
else:
  if at=<bt:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

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

x_oni = A + V * T
x_kodomo = B + W * T

if x_oni >= X_kodomo:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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 = W-V

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
import math
import sys
import sympy
import itertools
from math import gcd
from math import sqrt
from sys import stdin
def input() : return stdin.readline().rstrip()
def mips():
    return map(int,input().split())
def ii():
    return int(input())
sys.setrecursionlimit(10**9)

A,VA = mips()
B,VB = mips()
T = ii()
d1 = A + VA * T
d2 = B + VB * T
if d1 - d2 >= 0:
    print("YES")
else:
     print("NO")

Submission status: Runtime Error

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

if ((B-A)/(V-W)) <= T:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:


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

print 'YES' ig v*t >= w*t + abs(a-b) else 'NO'

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

x_oni = A + V * T
x_kodomo = B + W * T

if x_oni == X_kodomo:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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: Runtime Error

Solution code:
1 2
3 1
3

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

print 'YES' ig v*t >= w*t + abs(a-b) else 'NO'

Submission status: Runtime Error

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, v = rm()
b, w = rm()
t = ri()
if ((b-a) / (v-w)) % t == 0:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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

if abs(A-B)/abs(W-V) > T:
    print('NO')
else:
    print('YES')

Submission status: Runtime Error

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

ans = (A - B) / (W - V)

print("YES" if ans <= T else "NO")

Submission status: Runtime Error

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

    if v > w and a != b:
        ws('NO')

    tt = (a - b) / (w - v)
    if tt <= t:
        ws('YES')
    else:
        ws('NO')


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:

inf = 10**18
mod = 10**9+7

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float("inf")
EPS = 1e-6


def yes():
    print("YES")  # type: str


def no():
    print("NO")  # type: str


def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    t = abs(A-B)/(V-W)
    if 0 <= t <= T+EPS:
        yes()
    else:
        no()

    return


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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