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(int, input().split())
b,w =map(int, input().split())
t=int(input())
if v > w and ((v-w)**2**0.5)*t > ((a-b)**2**0.5):
    print("NO")
elif v > w:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
#鬼
A=int(input())
V=int(input())
#逃げ
B=int(input())
W=int(input())
#逃げる時間
T=int(input())

for k in range(1, T+1):
    a=A+(V*k)
    b=B+(W*k)
    if (a == b):
        print('YES')
    else:
        pass

Submission status: Runtime Error

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    elif (abs(a-b)/(v+w))%1 == 0 and t >= abs(a-b)/(v+w) >= 0:
        bit = 1
    elif b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
        else:
            if ((b-a)/(w-v))%1 == 0 and t >= ((b-a)/(w-v)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
        else:
            if ((a-b)/(v-w))%1 == 0 and t >= ((a-b)/(v-w)) >= 0:
                bit = 1
    print((a-b)/(w-v))
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

move_a = int(v) * int(t) + int(a)
move_b = int(w) * int(t) + int(b)

while not move_a == move_b:
    a, v = input().split()
    b, w = input().split()
    t = input()
else:
    if move_a <= move_b:
        print("YES")
    else:
        print("NO")

Submission status: Runtime Error

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

f = a + (b*e)
g = c + (d*e)

if g =< f:
	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:
    if 10**9+a<=t*v:
        print("YES")
        sys.exit()
    zb = b-t*w
    if zb<-(10**9):
        zb=-(10**9)
    if zb<a-v*t:
        print("NO")
        sys.exit()
    else:
        print("YES")
        sys.exit()
if a<b:
    if 10**9-a<=t*v:
        print("YES")
        yss.exit()
    zb=t*w+b
    if zb>=10**9:
        zb=10**9
    if zb>t*v+a:
        print("NO")
        sys.exit()
    else:
        print("YES")
        sys.exit()

Submission status: Runtime Error

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

if v*t > w*t:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a=int(input())
v=int(input())
b=int(input())
w=int(input())
t=int(input())
x = (t * v) + a;
y = (t* w) + b;


if(abs(x-y)<=1):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
#鬼
A=int(input())
V=int(input())
#逃げ
B=int(input())
W=int(input())
#逃げる時間
T=int(input())

for k in range(1, T+1):
    a=A+(V*k)
    b=B+(W*k)
    if (a == b):
        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())
gap_l = B-A
gap_v = V-W
if gap_v*T >= gap_l and gap_l%gap_v==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())
time = 0
timeyosou = abs(B-A)/(V-W)

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

Submission status: Runtime Error

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

d = b - a
d = int(d)
dv = v - w
dv = int(dv)
d = abs(d)
if int(d) % abs(dv) == 0 and int(d) <= int(dv) * T:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

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

if (V-W)*T >= B-A 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())

kyo = abs(b - a)
ti = abs(v -w)

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

if w > v or kyo % ti != 0:
    print("NO")
    exit()


if kyo / ti <= t:
    print("YES")
    exit()

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)
s = v - w
if s > 0 and not d%s and d/ss <= t:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
t=int(input())

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

Submission status: Runtime Error

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

d = b - a
d = int(d)
dv = v - w
d = abs(d)
if int(d) % int(dv) == 0 and  int(d) <= int(dv) * 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()
r = 'YES' if b - a <= abs(w * t - v * t) else 'NO'
print(r)

Submission status: Runtime Error

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

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

res = 0

if s > 0:
    tmp = lange / s
    if tmp.float.is_integer() and tmp <= T:
        res = 1

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

Submission status: Runtime Error

Solution code:
import sympy
import sys
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()
if A <= B:
    d1 = A + VA * T
    d2 = B + VB * T
    if d1 >= d2:
        print("YES")
    else:
        print("NO")
else:
    d2 = B - VB * T
    d1 = A - VA * T
    if d1 <= d2:
        print("YES")
    else:
        print("NO")

Submission status: Runtime Error

Solution code:
a, v, b, w, t = map(int, input().split())
v_1 = v
w_1 = w
if b < a:
  v_1 = -v
  w_1 = -w
if b+w_1*t <= a+v_1*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:
    x=a-v+t
    y=b-w*t
else:
    x=a+v*t
    y=b+w*t
    if abs(x)>=abs(y) or abs(x)=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:
  A_P = A + V * T
  B_P = B + W * T
  if A_P >= B_P:
    print("YES")
  else:
    print("NO")
else A > B:
  A_P = A - V * T
  B_P = B - W * T
  if A_P <= B_P:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

Solution code:
def tag (A, V, B, W, T):
    if B - A >= 0:
        if B - A <= (V - W)*T:
            print ("YES")
        else:
            print ("NO")
    else:
        if A - B <= (V - W)*T:
            print ("YES")
        else:
            print ("NO")
tag (1, 2, 3, 3, 3)
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 abs(V-W) == 0:
    print("NO")
elif:
    if abs(A-B) % abs(V-W) == 0:
        if abs(A-B) <= abs(V-W)*T:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Submission status: Runtime Error

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

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

if distance % sa != 0:
  print('NO')
elif distance < t*sa:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
#2問目
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
idouA = 0
idouB = 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 B < A:
        if A < 0 and B < 0:
            kankaku = abs(B) - abs(A)
        elif A > 0 and B > 0:
            kankaku = abs(A) - abs(B)
            
    if(idouB + kankaku <= idouA):
        print("YES")
    else:
        print("NO")

Submission status: Runtime Error

Solution code:
A,V,B,W,T=map(int,input().split())
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())

A = a+v*t
B = b+w*t

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

for i in range(1,T+1):
    s = A + V * i
    bs = B + W * i
    if s == bs:
        print("YES")
        exit(1)

print("NO")

Submission status: Runtime Error

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')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
#2問目
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
idouA = 0
idouB = 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 B < A:
         if A < 0 and B < 0:
            kankaku = abs(B) - abs(A)
        elif A > 0 and B > 0:
            kankaku = abs(A) - abs(B)
            
    if(idouB + kankaku <= idouA):
        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())

a_res = a + (v*t)
b_res = b + (w*t)

if a_res >. b_res:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
    long long A, B, V, M, T;
    cin >> A >> V;
    cin >> B >> M;
    cin >> T;

    long long kyori = abs(A - B);
    kyori += M * T;

    if((long double)kyori / V > T){
        cout << "NO" << endl;
    }else{
        cout << "YES" << endl;
    }

}

Submission status: Runtime Error

Solution code:
for i in range(1,T+1):
    s = A + V * i
    bs = B + W * i
    if s == bs:
        print("YES")
        exit(1)

print("NO")

Submission status: Runtime Error

Solution code:
a = int(input())
v = int(input())
b = int(input())
w = int(input())
t = int(input())
while t>0:
    a+=v;
    b+=w;
    if(a==b):
        print("YES")
        return
    t-=1
if(a==b):
    print("YES")
    return
print("NO")

Submission status: Runtime Error

Solution code:
import sympy
import sys
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()
if A <= B:
    d1 = A + VA * T
    d2 = B + VB * T
    if d1 >= d2:
        print("YES")
    else:
        print("NO")
else:
    d2 = B - VB * T
    d1 = A - VA * T
    if d1 <= d2:
        print("YES")
    else:
        print("NO")

Submission status: Runtime Error

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

if a+(b*e)>=c+(d*e):
    print('YES')
if a+(b*e)=<c+(d*e):
    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("NO")
    exit()



diff = max(A, B) - min(A, B)

speed = V - W

if diff / speed <= T:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:

def method():
  a, v = input().split()
  b, w = input().split()
  t = int(input())

  a = int(a) # Oni cordinate
  v = int(v) # Oni Speed
  b = int(b) # Nige Cordinate
  w = int(w) # Nige Speed

  if a < b:
    distance = b - a
    relative_speed = v - w
    if relative_speed <= 0:
      return 'NO'
    else:
      if (distance / relative_speed) > t:
        return 'NO'
      else:
        return 'YES'
  else: # b < a
    distance = a - b
    relative_speed = v - m
    if relative_speed <= 0:
      return 'NO'
    else:
      if (distance / relative_speed) > t:
        return 'NO'
      else:
        return 'YES'

print(method())

Submission status: Runtime Error

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

A_sum = A + V * T
B_sum = B + W * T

if B > A:
    if A_sum >= B_sum:
        print('YES')
    else:
        print('NO')

else:
    if A_sum <= B_sum
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
i=(input().split())
j=(input().split())
k=(input())

A=int(i[0])
V=int(i[1])
B=int(j[0])
W=int(j[1])
T=int(k)

print(B)

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

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

Submission status: Runtime Error

Solution code:
A_V = input().split()
A = int(A_V[0])
V = int(A_V[1])
B_W = input().split()
B = int(B_W[0])
W = int(B_W[1])
T = int(input())

if W - V < 0:
  print('NO')
elif T >= abs(B-A)/(W - V):
  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*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())
B, W = map(int, input().split())
T = input()
time = 0
timeyosou = abs(B-A)/(V-W)

if (V <= W):
    if (A < B):
        time = (10**9-A)/V
    else:
        time = (10**9+A)/V
else:
   if (A < B):
       if ((10**9 - B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 - A)/V
    if (A > B):
        if ((10**9 + B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 + A)/V

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

Submission status: Runtime Error

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

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

k = b - a
l = b*w + a*w

if (k < l):
    flag = False

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

Submission status: Runtime Error

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

move_a = v * t + a
move_b = w * t + b

if move_a > move_b:
    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)
ss = v+w
ms = abs(w-v)
if not d%ss and d/ss <= t:
  print("YES")
elif not d%ms and d/ms <= t:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A=int(input(""))
V = int(input(""))
B = int(input(""))
W = int(input(""))
T = int(input(""))
sum1=(V*T)+A
sum2=(T*W)+B
if(sum1>=sum2):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = input()
if V*T > 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:
    V, W = -V, -W

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

Submission status: Runtime Error

Solution code:
import sympy
import sys
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()
if A <= B:
    d1 = A + VA * T
    d2 = B + VB * T
    if d1 >= d2:
        print("YES")
    else:
        print("NO")
else:
    d2 = B - VB * T
    d1 = A - VA * T
    if d1 <= d2:
        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:
    if a < 0:
        if b < 0:
            ab = -b - -a
        else:
            ab = -a + b
    else:
        ab = b - a
else:
    if b < 0:
        if q < 0:
            ab = -a - -b
        else:
            ab = -b + a
    else:
        ab = a - b


vt = v * t
wt = w * t



if vt - wt >= ab:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

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

k = b - a
l = bw + aw

if (k < l):
    flag = False

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

Submission status: Runtime Error

Solution code:
pos_a, vel_a = input().split()
pos_b, vel_b = input().split()
t = input()
 
# 鬼の方が遅い
if vel_a <= vel_b:
  print('No')
  
if  abs(pos_a - pos_b) / vel_a - vel_b > T:
  print('No')
  
print('Yes')

Submission status: Runtime Error

Solution code:
a = int(input())
v = int(input())
b = int(input())
w = int(input())
t = int(input())

move_a = v * t + a
move_b = w * t + b

if move_a > move_b:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

d = b - a
dv = v - w
if int(d) % int(dv) == 0:
    if int(d) <= int(dv) * 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:
  result = "YES"
elif A == B:
  result = "YES"
else:
  if V - W > 0:
    for i in range(1, T + 1):
      if B - A - i * (V - W) == 0:
        result = "YES"
        break
  else:
    result = "NO"
print(result)

Submission status: Runtime Error

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    elif (abs(a-b)/(a+b))%1 == 0 and t >= abs(a-b)/(v+w) >= 0:
        bit = 1
    elif b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
A = list(map(int, input().split()))
B = list(map(int, input().split()))
T = list(map(int, input().split()))
abs(A[0]-B[0])/abs(T[0]*(A[1]-B[1]))

if (B[1]-A[1])>=0:
    print('NO')
elif abs(A[0]-B[0])<abs(T[0]*(A[1]-B[1])):
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
from decimal import Decimal
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
List=list(range(1,t+1))
if a==b:
    print("YES")
    exit()
elif v==w:
    print("NO")
    exit()
def binary_search(x, k, n):
 
  l = 1 #検索範囲の左端
 
  r = n #検索範囲の右端
 
 
 
  while r - l >= 1: #検索範囲がなくなったら処理を終了する
 
    i = (l + r) // 2 #iにデータの真ん中の位置を持たせる
 
    if k[i] == x:
 
      return True
 
    elif k[i] < x:
 
      l = i + 1
 
    else:
 
      r = i
 
 
 
  else:
 
    return False
    
if binary_search(Decimal(b-a)/Decimal(v-w), List, t)==True:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    elif (abs(a-b)/(a+b))%1 == 0 and t >= abs(a-b)/(a+b) >= 0:
        bit = 1
    elif b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

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

if A < B and V <= W:
    print('NO')
    exit()

val1 = A-B
val2 = V-W

if val1%val2 == 0:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main () {
  int64_t A, B, T, V, W;
  string ans = "NO";
  cin >> A >> V >> B >> W >> T;
  if (V < 0) V = -V;
  if (W < 0) W = -W;

  for (int64_t i = 0; i < T + 1; i++) {
    if (0 < B - A) A += V;
    else A -= V;
    if (0 < A - B) B += W;
    else B += W;
    if (A == B) {
      ans = "YES";
      break;
    }
  }
  cout << ans << endl;
}

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

Submission status: Runtime Error

Solution code:
(pos_a, vel_a) = input()
(pos_b, vel_b) = input()
t = input()
 
# 鬼の方が遅い
if vel_a <= vel_b:
  print('No')
  
if  abs(pos_a - pos_b) / vel_a - vel_b > T:
  print('No')
  
print('Yes')

Submission status: Runtime Error

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

if a == b:
    print('NO')
    exit()
elif b > a:
    if v <= w:
        print('NO')
        exit()

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

    if a - b <= t * (w-v):
        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
elif (a==b):
    flag=1
elif (b-a)<0:
    pass
elif t==0:
    pass
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())

if (B-A) % abs(V-W) == 0 and V > W:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    if (abs(a-b)/(a+b))%1==1 and t >=abs(a-b)/(a+b) >= 0:
        bit = 1
    if b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

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

Submission status: Runtime Error

Solution code:
pos_a, vel_a = input()
pos_b, vel_b = input()
t = input()

# 鬼の方が遅い
if vel_a <= vel_b:
  print('No')
  
if  abs(pos_a - pos_b) / vel_a - vel_b > T:
  print('No')
  
print('Yes')

Submission status: Runtime Error

Solution code:
A, V = map(int,input().split())
B, W = map(int,input().split())
T = int(input())
a = list(range(A, A+V*T, V))
b = list(range(B, B+W*T, W))
for i in range(T):
    if a[i] == b[i]:
        print('YES')
        exit(0)
print('NO')

Submission status: Runtime Error

Solution code:

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

    if( )

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


if __name__ == '__main__':
    main()

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

a, v = [int(a), int(v)]
b, w = [int(b), int(w)]
t = int(t)
a = a + (v*t)
b = b + (w*t)
if (a>=b):
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
_input = input
#'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''

#ここに書きたいコードを書く
#データ読み込み
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())

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

input = _input

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

    if A == B:
        print('YES')
    elif W > V:
        print('NO')
    elif (A - B) % (W - V) == 0 and (A - B) // (W - V) <= T:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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 kyori=<t*sokudo:
  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())

eva=False

pl=B-A
ve=V-W

if pl<=ve*T:
    if pl%ve==0:
        eva=True
if eva:
    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)) == 0 and abs(A-B) >= abs((W - V) * T):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
import math
import os
import random
import re
import sys
import collections
import itertools

def solution(a,v,b,w,t):
    if a < b:
        if v <= w:
            return "NO"
        else:
            if (b-a)/(v-w) > T:
                return "NO"
        return "YES"
    elif a > b:
        if w <= v:
            return "NO"
        else:
            if (a-b)/(w-v) > T:
                return "NO"
        return "YES"
    else:
        if v == w:
            return "YES"
        else:
            return "NO"


if __name__=="__main__":
    i1 = list(map(int, input().strip().split()))
    a, v = i1[0],i1[1]
    i2 = list(map(int, input().strip().split()))
    b, w = i2[0],i2[1]
    t = int(input().strip())
    print(solution(a,v, b, w, t))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if(V < W):
    print("NO")
elif(abs(A-B)>T*(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())

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