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: Wrong Answer

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_v>0: 
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:

import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
# do magic here
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
distA = v*t
distB = w*t

if a < b:
    if a+distA >= b+distB:
        print("YES")
    else:
        print("NO")
else:
    if a-distB >= b-distB:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:


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

a = A
b = B

T = int(input())
a += V * T
b += W * T

if a < b:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
import math
from sys import stdin,stdout
#% 998244353
from heapq import heapify,heappop,heappush
import collections


a,s1=list(map(int,stdin.readline().split()))
b,s2=list(map(int,stdin.readline().split()))
T = int(stdin.readline())
if s1==s2:
    print("NO")
elif s1>s2:
    if a>b:
        print("NO")
    else:
        d=b-a
        if d/(s1-s2)<=T:
            print("YES")
        else:
            print("NO")
else:
    if b>a:
        print("NO")
    else:
        d=a-b
        if d/(s2-s1)<=T:
            print("YES")
        else:
            print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,T+1):
    if A < B and V <= W:
        print("NO")
        break;
    d1 = (A+V*i)-(B+W*i)
    d2 = (A+V*(i-1))-(B+W*(i-1))
    if d1 == 0:
        print("YES")
        break;
    elif d1 <= d2  :
        print("NO")
        break;

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

T = int(input())

flag = True
if V < W:
  flag=False

  

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ans="No"
if v<=w:
    ans="No"
else:
    if a>b:
        (a-b)//(v-w)+1<=t
        ans="Yes"
    else:
        (b-a)//(v-w)+1<=t
        ans="Yes"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    a += 10**9
    b += 10**9
    if v == w:
        print('NO')
        return 0
    if b-a > 0 and w-v > 0:
        print('NO')
        return 0
    if a-b > 0 and v-w > 0:
        print('NO')
        return 0
    if abs((b-a)/(v-w)) <= t:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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 v - w == 0:
  print('NO')
  exit()
if 1 <= (b-a) / (v-w) <= t:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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())
    pA = A
    pB = B
    for _ in range(T):
        pA += V
        pB += W
        if pA <= pB and pB+W <= pA+V:
            print('YES')
            return
    print('NO')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

#print()

ans = "NO"
t=0

if W>=V:
    ans = "NO"
else:
    while(t<T):
        #print(t, A, B)
        if A == B:
            ans = "YES"
            break
        elif A > B:
            sa = A-B
            if sa%(V-W) == 0:
                t_tmp = (int(sa/(V-W)))
                t = t+t_tmp
                A = A-V*t_tmp
                B = B-W*t_tmp
            else:
                t_tmp = (int(sa/(V-W)))+1
                t = t+t_tmp
                A = A-V*t_tmp
                B = B-W*t_tmp
        elif A < B:
            sa = B-A
            if sa%(V-W) == 0:
                t_tmp = (int(sa/(V-W)))
                t = t+t_tmp
                A = A+V*t_tmp
                B = B+W*t_tmp
            else:
                t_tmp = (int(sa/(V-W)))+1
                t = t+t_tmp
                A = A+V*t_tmp
                B = B+W*t_tmp


print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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 a == b:print("YES")
elif (s*t != 0) and d%(s*t) == 0 and d <= (s*t):print("YES")
else:print("NO")

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
b = input().split(" ")
c = int(input())
l = int(a[0])
r = int(a[1])
k = int(b[0])
s = int(b[1])
if ((r * c) + l) >= ((s * c) + k) :
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

    if w >= v:
        print("NO")
    else:
        if l %  s == 0 and l // s <= t:
            print("YES")
        else:
            l2= l%s
            t2 = t- l//s
            s2 = abs(l2-s)
            if l2 % s2 == 0 and l2 //s2 <=t2 :
                print("YES")
            else:
                print("NO")

Submission status: Wrong Answer

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

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

ans = ((b-a)/10000000) / ((w-v) * t)
if ans <= 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
for i in range(t):
    a+=v
    b+=w
    if a>=b:
        print('YES')
        break
if a<b:
    print('NO')

Submission status: Wrong Answer

Solution code:
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

a,v = LI()
b,w = LI()
T = I()

if(a > b):
    a,b = b,a
    w,v = v,w
diff = b - a
diff2 = w - v

if(a == b):
    print('YES')
else:
    if(diff2 == 0):
        print('NO')
    else:
        if(diff % diff2 != 0):
            print('NO')
        else:
            if(diff // diff2 <= T):
                if(diff2 < 0):
                    print('YES')
                else:
                    print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
xit,xv = [int(x) for x in input().split()]
xd,dv = [int(x) for x in input().split()]
t = int(input())
rel = xv - dv
if rel == 0:
    print("NO")
    exit(0)
dist = xd - xit
if int(dist/rel) <= t and int(dist/rel) > 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

diff = A - B
diff_v = W - V

if diff < 0:
    diff *= -1
    diff_v *= -1

if diff_v != 0 and 0 <= diff / diff_v <= T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
distance = abs(a - b)
distance_t = (w * t) - (v * t)

if distance + distance_t <= 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if W >= V:
  print('NO')
elif L % (V - W) == 0:
  print('YES')

Submission status: Wrong Answer

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)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    A, V = map(int, input().strip().split(" "))
    B, W = map(int, input().strip().split(" "))
    T = int(input().strip())

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

    if L <= v * T:
        print("YES")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
#数値型を分割して取り出し
A, V = map(int, input().split())
B, W = map(int, input().split())
#数値型の取り出し
T = int(input())
#初期値に時間を足す
AA = A
BB = B
ans = "NO"
for i in range(1,T):
  AA = AA + V
  BB = BB + W
  if AA == BB:
    ans = "YES"
    break
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

count = 0
a = A
b = B

if A == B:
  print("NO")
  exit()

if A < B:
  if V <= W:
    print("NO")
  else:
    sa = B - A
    diff = V - W
    if sa % diff == 0:
      if sa//diff <= T:
        print("YES")
      else:
        print("NO")
    else:
      print("NO")
else:
  if V >= W:
    print("NO")
  else:
    sa = A - B
    diff = W - V
    if sa % diff == 0:
      if sa//diff <= T:
        print("YES")
      else:
        print("NO")
    else:
      print("NO")

Submission status: Wrong Answer

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: Wrong Answer

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

cnt=0
for tt in range(t):
    res=(w-v)*tt+(b-a)
    if res==0:
        cnt=1
        break

if cnt==1:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

if A > B:
    A_len = min((10**9) + A, V*T)
    B_len = min((10**9) + B, W*T)
    if (A_len - B_len) >=  (A - B):
        print('YES')
    else:
        print('NO')
else:
    A_len = min(10**9 - A, V*T)
    B_len = min(10**9 - B, W*T)
    if (A_len - B_len) >=  (B - A):
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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"
else:
    ans = "YES"
print(ans)

Submission status: Wrong Answer

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

if a>b:
	c=a-b
	if v>w:
		d=v-w
		if d*t%c==0:
			print('YES')
		elif d*t%c!=0:
			print('NO')
	elif w>v:
		d=w-v
		if d*t%c==0:
			print('YES')
		elif d*t%c!=0:
			print('NO')
	elif v==w:
		print('NO')

elif b>a:
	c=b-a
	if v>w:
		d=v-w
		if d*t%c==0:
			print('YES')
		elif d*t%c!=0:
			print('NO')
	elif w>v:
		d=w-v
		if d*t%c==0:
			print('YES')
		elif d*t%c!=0:
			print('NO')
	elif v==w:
		print('NO')

elif a==b:
	print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

dl = abs(a-b)
dv = v-w
# print(dl,dv)
if dl == 0:
    print('YES')
else:
    if dv > 0:
        # print(dl//dv)
        # if (dl+dv-1)//abs(dv) <= t:
        if dl//dv <= t:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if V <= W:
	print("No")
	exit()
elif L <= vd*T:
	print("Yes")
	exit()
else:
	print("No")

Submission status: Wrong Answer

Solution code:
import sys

A, V = [int(x) for x in input().strip().split(" ")]
B, W = [int(x) for x in input().strip().split(" ")]
T = int(input().strip())

if V <= W:
    print("NO")
    sys.exit(0)
df = A - B
t = df // (V - W)
if t <= T:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

if A == B:
  print("YES")
  exit()

if W > V:
  print("NO")
  exit()
  
if A > B:
  V *= -1
  W *= -1
    
for t in range(T):
  A += V
  B += W
  
  if A >= B:
    print("YES")
    exit()
  
print("NO")

Submission status: Wrong Answer

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

gaki1 = a + v * t
gaki2 = b + w * t


if b > a:
    if gaki1 >= gaki2:
        print("YES")
    else:
        print("NO")
else:
    if gaki2 >= gaki1:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

flag = 0
for i in range(t):
    if b < a:
        a = a - v
        b = b - w
    elif a < b:
        a += v
        b += w

    if a == b:
        flag = 1

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

Submission status: Wrong Answer

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

if a>b:
    for i in range(t+1):
        if a <= b:
            ans = "YES"
            break
        if v <= w:
            break
        a -= v
        b -= w
else:    
    for i in range(t+1):
        if a >= b:
            ans = "YES"
            break
        if v <= w:
            break
        a += v
        b += w
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

eva=False

pl=abs(B-A)
ve=V-W

if pl<=ve*T and 0<pl:
    if ve>0:
        if pl%abs(ve)==0:
            eva=True
if eva:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ans=0
  
for i in range(t+1):
  if a + v * i == b + w * i:
    ans='YES'
    break
  else:
    ans='NO'
if v == w:
  ans = 'NO'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#デフォルト
import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

sub = abs(b - a)
if sub == 0:
    print("YES")
else:
    ss = v - w
    if ss < 1:
        print("NO")
    else:
        if ss == 1:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif ss > sub:
            print("NO")
        elif sub % 2 == 0 and ss % 2 == 0:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif sub % 2 == 1 and ss % 2 == 1:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        else:
            print("NO")

Submission status: Wrong Answer

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

flag = 0
for i in range(t):
    if a+v*i >= b+w*i and a<b:
        flag = 1
        break
        
if flag ==1:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import string
import math

a = list(map(int,input().split()))
b = list(map(int,input().split()))
t = int(input())
flg = False

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

Submission status: Wrong Answer

Solution code:
from decimal import Decimal as d
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ya=a+v*t
yb=b+w*t
if w==v:
    print("NO")
    quit()
x=d((a-b)/(w-v))
if x<0:
    print("NO")
    quit()
if x<=t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

def zettaiti(A):
    if A>=0:
        return A
    else:
        return -A

A=zettaiti(A)
B=zettaiti(B)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(t):
    a = a + v
    b = b + w
    if a == b:
        print('YES')
        sys.exit()

print('NO')

Submission status: Wrong Answer

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

if (int(A) < int(B) and int(V) < int(W)):
    print("No")

a = int(A) + (int(V) * int(T))
b = int(B) + (int(W) * int(T))
if a >= b:
    print("Yes")

Submission status: Wrong Answer

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: Wrong Answer

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

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

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

if 0 < X <= T:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

if a>b:
    for i in range(t+1):
        if a <= b:
            ans = "YES"
            break
        if v <= w:
            break
        a -= v
        b -= w
else:    
    for i in range(t+1):
        if a >= b:
            ans = "YES"
            break
        if v <= w:
            break
        a += v
        b += w
print(ans)
print(a,b)

Submission status: Wrong Answer

Solution code:
a, a_v = map(int, input().split())
b, b_v = map(int, input().split())
t = int(input())
t_set = (b_v - a_v)/(a - b)

if t_set>t:
  print('No')
else:
  print('Yes');

Submission status: Wrong Answer

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 a == b:print("YES")
elif (s*t != 0) and d%(s*t) and d <= (s*t):print("YES")
else:print("NO")

Submission status: Wrong Answer

Solution code:
import sys
from decimal import Decimal

orga = list(map(Decimal, input().split()))
child = list(map(Decimal, input().split()))
time = Decimal(input())

speed = orga[1] - child[1]
dis = abs(orga[0] - child[0])

if speed <= 0:
    print("No")
    sys.exit()

if dis / speed <= time:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

T=int(input())

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

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

Submission status: Wrong Answer

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

length = int(a[0]) - int(b[0])
v = int(a[1]) - int(b[1])

if(a[1] == b[1]):
	print("no")
else:
	times = length / v

	if(times <= int(c)):
		print("yes")
	else:
		print("no")

Submission status: Wrong Answer

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

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