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

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

    if (distance==0):
        print("YES")

    if speed_d<=0:
        print("NO")
    else:
        if (distance%speed_d)!=0:
            if ((distance//speed_d)+1)<=T:
                print("YES")
            else:
                print("NO")
        else:
            if ((distance//speed_d))<=T:
                print("YES")
            else:
                print("NO")




if __name__=="__main__":
    main()

Submission status: Accepted

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

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

if abs(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())
dis=abs(a-b)
speed=v-w
if speed>0 and dis/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())
L = abs(a - b)
s = v - w
if s <= 0 or L / s > t:
    result = "NO"
else:
    result = "YES"
print(result)

Submission status: Accepted

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

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

else:
    print("NO")

Submission status: Accepted

Solution code:
a=input()
b=a.split()
A=int(b[0])
V=int(b[1])
c=input()
d=c.split()
B=int(d[0])
W=int(d[1])
T=int(input())
if (A == B):print("YES")
elif (A < B):
    if A - B >= T * (W - V):print("YES")
    else: print("NO")
else :
    if A - B <= T * (V - W):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
#鬼<逃の時
#鬼はA+V*T、逃B+W*Tまで移動出来る
#A+V*T＞=B+W*Tなら鬼の勝ち
#逃>鬼の時
#鬼はA-V*T,逃はB-W*Tまで移動出来る
#A-V*T＜=B-W*Tなら鬼の勝ち
a,v=list(map(int, input().split())) 
b,w=list(map(int, input().split())) 
t=int(input())
def hantei():
    if(a+v*t>=b+w*t):
        print("YES")
    else:
        print("NO")
def hantei2():
    if(a-v*t<=b-w*t):
        print("YES")
    else:
        print("NO")
if(a<b):
    hantei()
else:
    hantei2()

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

if V == W:
    print("NO")
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=(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 <= t*sa:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline
 
A,V = input().rstrip().split()
B,W = input().rstrip().split()
T = int(input().rstrip())
A,V,B,W = int(A),int(V),int(B),int(W)
s=0
L1=A-B
L2=B-A
S=V-W
if V<=W:
  print('NO')
  s=1
else:
    if B<A:
      if L1/S<=T:
        print('YES')
      else:print('NO')
    else:
      if L2/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 v<=w:
    print('NO')
elif a<b and (b-a)/(v-w)<=t:# and (b-a)/(v-w)==(b-a)//(v-w):
    print('YES')
elif b<a and (a-b)/(v-w)<=t:# and (a-b)/w-v:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

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

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

Submission status: Accepted

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

if(A>B):
  A *= -1
  B *= -1

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

Submission status: Accepted

Solution code:
in_a = [int(x) for x in input().split(' ')]
in_b = [int(x) for x in input().split(' ')]
t = int(input())

result = False

p_a = in_a[0]
p_b = in_b[0]
m_a = in_a[1]
m_b = in_b[1]
end_p_a = m_a*t
end_p_b = m_b*t

diff_s = abs(p_a-p_b)

if end_p_a-end_p_b>=diff_s:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
import numpy as np
import scipy as sp

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
delta = abs(a-b)
if(delta <= (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())
judge=bool(abs(a-b)<=(v-w)*t)
if judge:
    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())
m = abs(a-b)
if a>b:
  if (v-w)*t>=m:
    print("YES")
  else:
    print("NO")
else:
  if (v-w)*t>=m:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
import sys

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

    out = 'NO'

    if V==W:
        if B==A:
            out = 'YES'
            print(out)
            sys.exit()
        else:
            print(out)
            sys.exit()

    if B < A:
        t = (B - A) / (W - V)
    else:
        t = (B - A) / (V - W)
        
    if t >= 0:
        if t<=T:
            out = 'YES'
    
    print(out)
main()

Submission status: Accepted

Solution code:
import sys

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

if w >= v:
    print('NO')
    sys.exit()

min_a = -1 * v * t + a
max_a = v * t + a
min_b = -1 * w * t + b
max_b = w * t + b

if min_a <= min_b and max_b <= max_a:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
from collections import defaultdict
from heapq import heappop, heappush

from decimal import *

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

##### 累乗 #####
# pow(x, y, z) -> x**y % z

##### 割り算の切り上げ #####
# tmp = -(-4 // 3)

##### dict の for文 #####
# for k, v in d.items():
#     print(k, v)

##### 進数の変換 #####
# bin_str = bin(i)[2:]
# oct_str = oct(i)[2:]
# hex_str = hex(i)[2:]

##### とても大きな数 と 小数の計算誤差 #####
# 「Decimal」は計算誤差を 0にできる。必要に応じて粒度を設定せよ。
# getcontext().prec = 100
#
# tmp = Decimal(i)
# A,B = map(Decimal, input().split())
# ans = A * B

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	A,V = inputMap()
	B,W = inputMap()
	T = inputInt()

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

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

	if hayasa < 1:
		print("NO")
		sys.exit()

	if T * hayasa >= kyori:
		print("YES")
	else:
		print("NO")





#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# 2分検索のリバース
def bisect_left_reverse(a, x):
    if a[0] <= x:
        return 0
    if x < a[-1]:
        return len(a)
    # 二分探索
    ok = len(a) - 1
    ng = 0
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if a[mid] <= x:
            ok = mid
        else:
            ng = mid
    return ok

def bisect_right_reverse(a, x):
    if a[0] < x:
        return 0
    if x <= a[-1]:
        return len(a)
    # 二分探索
    ok = len(a) - 1
    ng = 0
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if a[mid] < x:
            ok = mid
        else:
            ng = mid
    return ok

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# 2分検索
# 存在しない場合: None 存在する場合: その値
def binary_search(list, item):
    low = 0
    high = len(list) - 1

    while low <= high:
        mid = (low + high) //2
        guess = list[mid]
        if guess == item:
            return mid
        if guess > item:
            high = mid -1
        else:
            low = mid + 1
    return None

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# N 個のボールを K グループに分ける場合のパターン数
def sunuke(N, K, mod=10**9+7):
	if N < K or K-1 < 0:
		return 0
	else:
		return combination(N-1, K-1, mod)

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# nCr mod m
# rがn/2に近いと非常に重くなる
def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

# mを法とするaの乗法的逆元
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# nHr mod m
# 問題によって、combination()を切り替えること
def H(n, r, mod=10**9+7):
	# comb = Combination(n+r-1, mod)
	# return comb(n+r-1, r)
    return combination(n+r-1, r, mod)


class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# dfs のサンプル
def dfs(graph,parent,counter,edge):
    stk = []
    stk.append(edge)
    while len(stk) > 0:
        p = stk.pop()
        for e in graph[p]:
            if parent[p] == e:
                continue
            else:
                parent[e] = p
                counter[e] += counter[p]
                stk.append(e)

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()

Submission status: Accepted

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

if abs(A[0]-B[0])+B[1]*T>A[1]*T:
       print("NO")
else:
       print("YES")

Submission status: Accepted

Solution code:
#atcoder template
def main():
    import sys
    imput = sys.stdin.readline
    #文字列入力の時は上記はerrorとなる。
    #ここにコード
    #B
    #input
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

    #output
    #A < Bの時
        #V <= Wであれば、相手はひたすら逃げれば良く、この時鬼は相手を捕まえられない。
        #V > Wであれば、鬼は1秒に相手との距離をV-Wだけ詰められる。
        #B-A//V-WがTより小さいか同じ場合は鬼は相手を捕まえられる。
    #A > Bの時
        #上の議論とほぼ同じ。

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

    #N = 1のときなどcorner caseを確認！
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:
  print("YES")
  exit()

if W >= V:
  print("NO")
  exit()
  
if A > B:
  V *= -1
  W *= -1

  A = A + V * T
  B = B + W * T
  if A <= B:
    print("YES")
    exit()

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

if w>=v:
    print("NO")

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

iter = False
#while iter == False:
if a < b:
  if a + t*v >= b + t*w:
    iter =True
 
elif a > b:
  if a - t*v <= b - t*w:
    iter = True

elif a == b:
  iter = True
  


if iter == True:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

# 方向
dir = 1
if b < a:
    dir = -1

# 移動先
pos_a = a + v * dir * t
pos_b = b + w * dir * t

ret = "NO"
if dir == 1 and pos_a >= pos_b:
    ret = "YES"
elif dir == -1 and pos_b >= pos_a:
    ret = "YES"

print("{}".format(ret))

Submission status: Accepted

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


distance = abs(b-a)

ds = v - w


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

Submission status: Accepted

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

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

if d <= v * T:
    if V > W:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

Submission status: Accepted

Solution code:
oni = list(map(int,input().split()))
child =list(map(int,input().split()))
time = int(input())

if oni[0]<child[0]:
    oni_kyori = oni[0]+oni[1]*time
    child_kyori = child[0]+child[1]*time

    if oni_kyori<child_kyori:
        print('NO')
    else:
        print('YES')
else:
    oni_kyori = oni[0]-oni[1]*time
    child_kyori = child[0]-child[1]*time

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

Submission status: Accepted

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

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


main()

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

Submission status: Accepted

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

if v==w:
    print("NO")
    exit()
atai = Decimal(abs(b-a))/Decimal(abs(v-w))
if atai<=t and a+v*t>=b+w*t:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

if V <= W:
    print('NO')
    sys.exit()    

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    if W >= V:
        print("NO")
        sys.exit()
    x = abs(A-B)
    v = V-W
    if x > T*v:
        print("NO")
    else:
        print("YES")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

speed_dif = (v - w) * t
dis_dif = abs(a - b)

if dis_dif <= speed_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())

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

if w >= v:
    print("NO")
    exit()


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A = int(A)
V = int(V)
B = int(B)
W = int(W)

T = int(input())



def solve():

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

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

    time = distance/closer
    if time <= T:
        print("YES")
        return
    else:
        print("NO")
        return


solve()

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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: Accepted

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

if(int(AV[0]) > int(BW[0])):
  T *= -1

a = int(AV[0]) + int(AV[1]) * T
b = int(BW[0]) + int(BW[1]) * T

if(T >=0 and a >= b):
  print('YES')
elif(T <= 0 and a <= b):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
import sys

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

x = abs((A - B))
y = (V - W)

if y <= 0:
    print("NO")
    sys.exit()

z = x / y

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

Submission status: Accepted

Solution code:
line = input().split()
line2 = input().split()
lim = int(input())

apos = int(line[0])
aspeed = int(line[1])
bpos = int(line2[0])
bspeed = int(line2[1])

distance = abs(bpos - apos)
deltaspeed = aspeed - bspeed

if deltaspeed <= 0:
  print("NO")
if deltaspeed > 0:
  time = distance/deltaspeed
  if time <= lim:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=input().split()
b=input().split()
t=int(input())
dis=abs(int(a[0])-int(b[0]))
p=-(int(b[1])-int(a[1]))
if p<=0: 
    print("NO")
else:
    if dis/p>t:
        print("NO")
    else:
        print("YES")

Submission status: Accepted

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

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

k = b - a
flag = False

if k >= 0:
    l = T*v - T*w 
    if (k <= l):
        flag = True

if k < 0:
    k = a - b
    l = T*v - T*w
    if (k <= l):
        flag = True


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

Submission status: Accepted

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

    if v == w:
        print('NO')
        return 0
    if 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: Accepted

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

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

Submission status: Accepted

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

result = 'NO'

if a == b:
    result = 'YES'
elif a < b and b + w * t <= a + v * t:
    result = 'YES'
elif b < a and b - w * t >= a - v * t:
    result = 'YES'

print(result)

Submission status: Accepted

Solution code:
A,V=map(int, input().split())
B,W=map(int, input().split())
T,=map(int, input().split())
x=abs(B-A)
v=V-W
if(x<=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 V - W > 0:
  if abs(B - A) - T * abs(V - W) <= 0:
    result = "YES"
  else:
    result = "NO"
else:
  result = "NO"
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#

import sys
input=sys.stdin.readline

def main():
    A,V=map(int,input().split())
    B,W=map(int,input().split())
    T=int(input())
    y=0
    d=abs(A-B)
    if V!=W:
        t=d/(V-W)
        if 0<=t<=T:
            y=1
    
    if y==1:
        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 (b >= a):
  aa=a+v*t
  bb=b+w*t
  if (bb-aa >0):
    print ('NO')
  else:
    print ('YES')
else:
  aa=a-v*t
  bb=b-w*t
  if (bb-aa <0):
    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:
  av = a - (v * t)
  bw = b - (w * t)
  if av <= bw:
    print('YES')
  else:
    print('NO')

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

Submission status: Accepted

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 dv > 0 and abs(d) <= abs(dv) * T:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
AV = [int(x) for x in input().split()]
BW = [int(x) for x in input().split()]
A = AV[0]
V = AV[1]
B = BW[0]
W = BW[1]
T = int(input())
T = float(T)
D = abs(A-B)
S = V-W
if S>0:
    T1 = float(D/S)
    if T1<=T:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

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


if 'unittest' not in globals():
    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")
  exit()

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

Submission status: Accepted

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

oni = v*t
nige = w*t
sa = abs(b-a)

if oni - nige >= sa:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

if abs(A-B) > (V*T)-(W*T):
  print('NO')
  exit()

tt =T/2
if tt%2 != 0:
    tt += 0.5

tt = int(tt)

for i in range(1,tt):
  if tt*V+A < tt*W+B:
    break
  if V*i+A >= W*i+B:
    print('YES')
    exit()

for i in range(tt,T+1):
  if V*i+A >= W*i+B:
    print('YES')
    exit()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if V <= W:
    # 追いつけない
    print("NO")
else:
    dx = abs(A - B)
    dv = V - W
    t = dx / dv
    if t <= T:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

if b >= a:
    a_2 = t * v + a
    b_2 = t * w + b

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

    if a_2 <= b_2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a=[input() for i in range(3)]

oni=[int(i) for i in a[0].split()]
hito=[int(i) for i in a[1].split()]
t=int(a[2])

kyori=abs(oni[0]-hito[0])
spe=(oni[1]-hito[1])

if spe<=0:
	print("NO")

else:

	if kyori>spe*t:
		print("NO")

	else:
		print("YES")