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, a_v = map(int, input().split())
b, b_v = map(int, input().split())
t = int(input())
flag = 0
t_set = 0
if a > b:
  temp = a
  a = b
  b=temp
  
  temp_v = a_v
  a_v = b_v 
  b_v = temp_v

  
v = a_v - b_v
l = b - a

if l==0 or a_v != b_v:
  print('YES')
elif v==0:
  print('NO')
elif v*t>=l and l%v == 0:
  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;    
    d = abs(B-A)-(abs(V-W)*i)
    if d == 0:
        print("YES")
        break;
    elif d != 0 and i == T:
        print("NO")

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
dis = B-A
mob = V-W
if B < A:
    print("No")
else:
    for i in range(T):
        dis -= mob
        if dis <= 0:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

a = A + W*T
b = B + V*T

if a >= 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())
b = max(a,b)
a = min(a,b)
gap = abs(v-w)
if v>w:
  c=float((b-a)/gap)
  if t>=c:
    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())
v=V-W
l=B-A
if v==0:
  print("NO")
else:  
  if l>0:
    if l <= v*T:
      if l%v==0:
        print("YES")
      else:
        print("NO")
    else:
      print("NO")
  else:
    if l <= v*T:
      if l%v==0:
        print("YES")
      else:
        print("NO")
    else:
      print("NO")

Submission status: Wrong Answer

Solution code:
import math

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

if A == B and V == W:
    print("YES")
else:
    if A != B and V == W:
        print("NO")
    else:
        x = math.ceil(abs((A - B)/(W - V)))
        if A + V * T >= B + W * T:
            if A + V * x == B + W * x:
                print("YES")
            else:
                print("NO")
        else:
            print("NO")

Submission status: Wrong Answer

Solution code:
P = []
S = []
for i in range(2):
    pp, ss  = map(int, input().split())
    P.append(pp)
    S.append(ss)

A = P[0]
V = P[1]
B = S[0]
W = S[1]
T = int(input())

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

Submission status: Wrong Answer

Solution code:
a,w=map(int,input().split())
b,y=map(int,input().split())
n=int(input())
if w==y:
  print("NO")
else:
  print("YES") if abs(a-b)/(w-y)<n 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())
if V<=W or B < A or (V-W)*T < (B-A):
  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')
    
elif A > B and V > W:
    print('NO')
     
elif B > A and W > V:
    print('NO')

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

Submission status: Wrong Answer

Solution code:
ax, at = map(int, input().split(' '))
bx, bt = map(int, input().split(' '))
t = int(input())

if ax > bx:
	ax, at, bx, bt = bx, bt, ax, at

a_l = ax + at*t
b_l = bx + bt*t

if a_l < b_l:
	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())
a=(V*T-A)*A
b=(V*T-B)*B
if a>=T or b>=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())

if v == w:
  print("NO")
  
elif (v < w):
  ans = (a - b) / (w - v)
  if t <= ans:
    print("YES")
  else:
    print("NO")
else:
  ans = (b - a) / (v - w)
  if t >= ans:
    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):
    d = abs(B-A)-(abs(V-W)*i)
    if d == 0:
        print("YES")
        break;
    elif d != 0 and i == T:
        print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 20:58:10 2020

@author: sd18016
"""

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

if V == W:
    print("NO")
else:
    if B > A:
        kyori = B-A
        miji = V-W
        if miji < 0:
            print("NO")
        else:
            if kyori % miji == 0:
                a = kyori // miji
                if 1 <= a <= T:
                    print("YES")
                else:
                    print("NO")
            else:
                print("NO")
    else:
        kyori = A-B
        miji = -V-(-W)
        if miji > 0:
            print("NO")
        else:
            if kyori % abs(miji) == 0:
                a = kyori // abs(miji)
                if 1 <= a <= 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())
b = max(a,b)
a = min(a,b)
gap = abs(v-w)
if v>w:
  c=(b-a)/gap
  if t>c:
    print('YES')
  else:
    print('NO')
else:
  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):
    print('YES')
elif(a > b):
    diff = a - b
    diff2 = v - w
    if(diff2 <= 0):
        print('NO')
    else:
        if(diff // diff2 <= T):
            print('YES')
        else:
            print('NO')
else:
    diff = b - a
    diff2 = v - w
    if(diff2 <= 0):
        print('NO')
    else:
        if(diff // diff2 <= 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())

d0 = abs(A - B)
dx = V - W

for i in range(T):
  if T*dx < d0:
    print("NO")
    break
  if i*dx == d0:
  	print("YES")
  	break
    
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n = int(input())

c = float(a[0])
d = float(b[0])

for i in range(n):
    c = c + int(a[1])
    d = d + int(b[1])

if c <= d:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())
e = a[1]-b[1]
p = b[0]-a[0]
f = a[0]
aa = a[0]+a[1]*c
bb = b[0]+b[1]*c
if e == 0 or e <= 0:
  print("NO")
else:
  if aa >= bb:
    for i in range(c+1):
      f += e
      if f == b[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())

def check():
  deltaD=B-A
  deltaV=V-W
  if deltaD<0:
    return 'NO'  
  if deltaD==0:
    return 'YES'
  if deltaV<=0:
    return 'NO'
  if deltaV>0:
     if float(T) >= float(deltaD/deltaV):
        return 'YES'
  return 'NO'  
print(check())

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

Submission status: Wrong Answer

Solution code:
def calc(oniend, kid , pase):
  if (pase <= 0) or ((oniend * pase) < kid):
    return "NO"
  #elif ((oniend - kid) % pase) == 0:
  else:
    return "YES"

in1 = input().split()
in2 = input().split()
in3 = input()
oni = int(in1[0])
onispeed = int(in1[1])
kid = int(in2[0])
kidspeed = int(in2[1])
time = int(in3)

pase = onispeed - kidspeed
oniend = (pase * time) + oni

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

Submission status: Wrong Answer

Solution code:
ax, at = map(int, input().split(' '))
bx, bt = map(int, input().split(' '))
t = int(input())
 
a_l = ax + at*t
b_l = bx + bt*t
 
if a_l < b_l and at == bt:
	print("NO")
else:
	print("YES")

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)

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

t, distance = divmod(distance, diff)
T -= t
if 0 > T:
    print("NO")
    sys.exit(0)
if distance == 0:
    print("YES")
    sys.exit(0)
print("NO")

Submission status: Wrong Answer

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

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

LIMIT = 100

va = [A + V * t for t in range(1, LIMIT)]
va.extend([A - V * t for t in range(1, LIMIT)])
vb = [B + W * t for t in range(1, LIMIT)]
vb.extend([B - W * t for t in range(1, LIMIT)])

va_vb_and = list(set(va) & set(vb))

if va_vb_and:
    print('YES')
    exit()
print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

# 既に同じ場所にいる場合
if int(A) == int(B):
    print("YES")
else:
    # 移動可能距離を計算
    a_move = int(T) * int(V)
    b_move = int(T) * int(W)

    # aとbの位置関係を考える
    if int(A) < int(B):
        # a -> b
        # 追い詰めることが可能な距離にいる場合は問答無用で捕まえられる
        if int(A) + a_move >= 10 ** 9 or int(B) + b_move >= 10 ** 9:
            print("YES")
        else:
            if a_move >= b_move:
                print("YES")
            else:
                print("NO")
    else:
        # b -> a
        if int(A) - a_move <= -(10 ** 9) or int(B) - b_move <= -(10 ** 9):
            print("YES")
        else:
            if a_move <= b_move:
                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())
dd=v-w
ff=b-a
cnt = 0
for tt in range(1, t + 1):
    res = ff-dd * tt
    if res == 0:
        cnt = 1

if a >= b and w >= v:
    cnt = 0
if cnt == 1:
    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())
if V<=W or (V-W)*T <= (B-A):
  print('NO')
else :
  print('YES')

Submission status: Wrong Answer

Solution code:
def calc(oniend, kid , pase):
  if (pase <= 0) or ((oniend * pase) < kid):
    return "NO"
  #elif ((oniend - kid) % pase) == 0:
  else:
    return "YES"

in1 = input().split()
in2 = input().split()
in3 = input()
oni = int(in1[0])
onispeed = int(in1[1])
kid = int(in2[0])
kidspeed = int(in2[1])
time = int(in3)

pase = onispeed - kidspeed
oniend = (pase * time) + oni

if (pase <= 0) or (oniend < kid):
  print("NO")
elif ((oniend - kid) % pase) == 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 v<w and a<b:
  print("NO")
  exit()
elif v>w and a>b:
  print("NO")
  exit()
elif v==w:
  print("NO")
  exit()
  
if (b-a)%(v-w)==0 and (b-a)/(v-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())

lange = A - B
s = V - W

res = 0

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

if (res == 0):
    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 (-10**9 <= A <= 10**9) and (-10**9 <= B <= 10**9) and (1 <= V <= 10**9) \
and  (1 <= W <= 10**9) and (1 <= T <= 10**9) and (A != B) and type(A) == int and\
type(B) == int and type(V) == int and type(W) == int and type(T) == int:
    
    for i in range(T): 
        if A > B:
            A -= V
            B -= W
            
        
        elif A < B:
            A += V
            B += W

        else:
            print("YES")
            break
    
    if 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())
b = max(a,b)
a = min(a,b)
gap = abs(v-w)
if v>w:
  c=(b-a)/gap
  if t>=c:
    print('YES')
  else:
    print('NO')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
def main():
    A, V = map(int,input().split())
    B, W = map(int,input().split())
    T = int(input())
    if A < B and A+V*T+V >= B+W*T+W:
        return('YES')
    else:
        return('NO')
print(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==0:
    print("NO")
else:
    ArriveTime = float((B-A)/(V-W))
    if ArriveTime < 0:
        print("NO")
    else:
        if float(T) >= ArriveTime:
            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 (t * (-1)) <= ((b - a) / (v - 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):
    d = abs(B-A)-(abs(V-W)*i)
    if d == 0:
        print("YES")
        break;
    elif d != 0 and i == T+1:
        print("NO")

Submission status: Wrong Answer

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

x = 0
for _ in range(t):
  a += v
  b += w
  if a == b:
    x += 1
    break
  elif a > b:
    break
    
if x == 1:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10000)

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


def onigokko(a, v, b, w):
    if v == w or a == b:
        return False

    if b > a:
        time = (b-a)/(v-w)
    else:
        time = (b-a)/(w-v)

    if time < 0:
        return False
    if time.is_integer():
        return True
    if time > t:
        return False

    onigokko(a, v, b, w)

result = False
try:
    result = onigokko(a, v, b, w)
except:
    result = False

if result:
    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*V
b=B*W
if a>=T or b>=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())
dd=(v-w)/1000
ff=(b-a)/1000
cnt = 0
for tt in range(1, t + 1):
    res = ff-dd * tt
    if res == 0:
        cnt = 1

if a >= b and w >= v:
    cnt = 0
if cnt == 1:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
str1 = input()
str2 = input()
str3 = input()

A = str1.split(" ")
B = str1.split(" ")
C = int(str3)
res = ""

if int(A[1]) >= int(B[1]):
    res = "NO"
else:
    # 距離差
    diff = int(B[0]) - int(A[0])    
    # 速度差
    speedDiff = int(B[1]) - int(A[1])
    if speedDiff * C < diff:
        res = "NO"
    else:
        res = "YES"


print(res)

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')
elif W>=B:
    print('NO')
elif abs(A-B)>T*(V-W):
    print('NO')
elif V>=3 and W*2!=V:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
def main():
  xy = [map(int, input().split()) for _ in range(2)]
  x,y = [list(i) for i in zip(*xy)]
  a = int(input())
  
  for j in range(a):
    x[0] = x[0] + y[0]
    x[1] = x[1] + y[1]
    
    if x[0] == x[1]:
      print("YES")
      break
      
    elif j == a-1:
      print("NO")
      break
      
      
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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;
    d = abs(B-A)-(abs(V-W)*i)
    if d == 0:
        print("YES")
        break;
    elif d != 0 and i == T+1:
        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:
    if (abs(B-A) <= (abs(V-W) * T)) & (abs(B-A) % abs(V-W) == 0):
        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 = float(input())

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

Submission status: Wrong Answer

Solution code:
A = input().split()
A_pos = int(A[0])
A_v = int(A[1])
B = input().split()
B_pos = int(B[0])
B_v = int(B[1])

T = int(input())

if(A_pos>B_pos):
  if(A_v >= B_v):
    print("NO")
  else:
    dif_v = B_v - A_v
    if(dif_v * T >= A_pos - B_pos):
      print("YES")
    else:
      print("NO")
else:
  if(B_v >= A_v):
    print("NO")
  else:
    dif_v = A_v - B_v
    if(dif_v * T >= B_pos - A_pos):
      print("YES")
    else:
      print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 20:58:10 2020

@author: sd18016
"""

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

if V == W:
    print("NO")
else:
    if B > A:
        kyori = B-A
        miji = V-W
        if miji < 0:
            print("NO")
        else:
            if kyori % miji == 0:
                a = kyori // miji
                if 1 <= a <= T:
                    print("YES")
                else:
                    print("NO")
            else:
                print("NO")
    else:
        kyori = A-B
        miji = W-V
        if miji < 0:
            print("NO")
        else:
            if kyori % miji == 0:
                a = kyori // miji
                if 1 <= a <= T:
                    print("YES")
                else:
                    print("NO")
            else:
                print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, W = map(int,input().split())
B, V = map(int,input().split())
T = int(input())
flag = "NO"
mid = T//2
i = 1
while True:
    i += 1
    a = A + W*mid
    b = B + V*mid
    if a == b:
        flag = "YES"
        break
    elif a > b:
        if a - W < b - V:
            break
        elif T//(2**i) == 0:
            mid = mid - 1
            if mid < 1:
                break
        else:
            mid = mid - T//(2**i)
    elif a < b:
        if a + W > b + V:
            break
        elif T//(2**i) == 0:
            mid = mid + 1
            if mid > T:
                break
        else:
            mid = mid + T//(2**i)

print(flag)

Submission status: Wrong Answer

Solution code:
a, a_v = map(int, input().split())
b, b_v = map(int, input().split())
t = int(input())
flag=0
t_set = 0
if a > b:
  temp = a
  a = b
  b=temp
  temp_v = a_v
  a_v = b_v 
  b_v = temp_v

  
v = a_v - b_v
l = b - a

if l==0:
  print('YES')
elif v==0:
  print('NO')
elif v*t>=l and l%v == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import sys

n = list(map(int,input().split()))
r = list(map(int,input().split()))
t = int(input())

A = n[0]
V = n[1]

B = r[0]
W = r[1]

T = t

after_a = A + V * T
after_b = B + W * T

after_a_min = A - V * T
after_b_min = B - V * T

if (after_a == after_b) or (after_a_min == after_b_min):
    print('YES')
    sys.exit()

if A < B and after_a > after_b:
    print('YES')
    sys.exit()

if A < B and after_a < after_b:
    print('NO')
    sys.exit()


if A > B and after_a_min > after_b_min:
    print('YES')
    sys.exit()

if A > B and after_a_min < after_b_min:
    print('NO')
    sys.exit()

Submission status: Wrong Answer

Solution code:
def calc(oniend, kid , pase):
  if (pase <= 0) or ((oniend * pase) < kid):
    return "NO"
  #elif ((oniend - kid) % pase) == 0:
  else:
    return "YES"

in1 = input().split()
in2 = input().split()
in3 = input()
oni = int(in1[0])
onispeed = int(in1[1])
kid = int(in2[0])
kidspeed = int(in2[1])
time = int(in3)

pase = onispeed - kidspeed
oniend = (pase * time) + oni

if (pase <= 0) or (oniend < kid):
  print("NO")
elif ((oniend - kid) % pase) == 0:
  print("YES")

Submission status: Wrong Answer

Solution code:
A,V = map(int, input().split())
B,W = map(int, input().split())
T=int(input())
a=A*V
b=B*W
if a>T or b>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())
if V>W and (A-B)%(V-W)==0 and abs(A-B)//(V-W)<=T:
    Flag = True
else:
    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())

distance = b - a
speed_remainder = v - w

if speed_remainder <= 0:
    print("NO")
elif distance <= 0:
    print("NO")
elif distance <= t * speed_remainder:
    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 and a == b:
    print('YES')
elif v == w and a != b:
    print('NO')
elif a == b:
    print('NO')
else:
    if 0 < ((b - a) / (v - 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())
d = abs(A - B)
v = V - W
ans = 'YES'

if v <= 0:
  ans = 'NO'
else: 
  if d / v > T:
    ans = 'NO'
  if d % v != 0:
    ans = 'NO'
    
print(ans)

Submission status: Wrong Answer

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

if(int(b[0])>int(a[0])):
	if(int(b[1])>=int(a[1])):
		print("NO")
	else:
		length = int(b[0]) - int(a[0])
		v = int(a[1]) - int(b[1])
		times = length / v
		if(times <= int(c))&(times >0):
			print("YES")
		else:
			print("NO")
else:
	if(int(b[1])<=int(a[1])):
		print("NO")
	else:
		length = -int(b[0]) + int(a[0])
		v = -int(a[1]) + int(b[1])
		times = length / v
		if(times <= int(c))&(times >0):
			print("YES")
		else:
			print("NO")

Submission status: Wrong Answer

Solution code:
import sys

n = list(map(int,input().split()))
r = list(map(int,input().split()))
t = int(input())

A = n[0]
V = n[1]

B = r[0]
W = r[1]

T = t

after_a = A + V * T
after_b = B + W * T

after_a_min = A - V * T
after_b_min = B - V * T

if (after_a == after_b) or (after_a_min == after_b_min):
    print('YES')
    sys.exit()

if A < B and after_a > after_b:
    print('YES')
    sys.exit()

if A < B and after_a <= after_b:
    print('NO')
    sys.exit()


if A > B and after_a_min < after_b_min:
    print('YES')
    sys.exit()

if A > B and after_a_min >= after_b_min:
    print('NO')
    sys.exit()

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

else:
  if a - b < (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())
D = abs(A - B)
S = V - W
if V - W <= 0:
  print("NO")
else:
  if D / S > T:
    print("NO")
  else:
    print("Yes")

Submission status: Wrong Answer

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

if B < A:
    print("No")
    
else:
    if mob <= 0:
        print("No")
    else:
        if dis - mob*T <= 0:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
import sys

n = list(map(int,input().split()))
r = list(map(int,input().split()))
t = int(input())

A = n[0]
V = n[1]

B = r[0]
W = r[1]

T = t

after_a = A + V * T
after_b = B + W * T

after_a_min = A - V * T
after_b_min = B - V * T

if (after_a == after_b) or after_a_min == after_b_min:
    print('YES')
    sys.exit()

if A < B and after_a > after_b:
    print('YES')
    sys.exit()

if A < B and after_a <= after_b:
    print('NO')
    sys.exit()


if A > B and after_a_min < after_b_min:
    print('YES')
    sys.exit()

if A > B and after_a_min >= after_b_min:
    print('NO')
    sys.exit()

Submission status: Wrong Answer

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


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

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

    if Ap <= Bp:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
def calc(oniend, kid , pase):
  if (pase <= 0) or ((oniend * pase) < kid):
    return "NO"
  #elif ((oniend - kid) % pase) == 0:
  else:
    return "YES"

in1 = input().split()
in2 = input().split()
in3 = input()
oni = int(in1[0])
onispeed = int(in1[1])
kid = int(in2[0])
kidspeed = int(in2[1])
time = int(in3)

pase = onispeed - kidspeed
oniend = (pase * time) + oni

if (pase <= 0) or ((time * pase)+oniend < kid):
  print("NO")
  #elif ((oniend - kid) % pase) == 0:
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
s1 = input().split()
intA = int(s1[0])
intV = int(s1[1])

s2 = input().split()
intB = int(s2[0])
intW = int(s2[1])

s3 = input().split()
intT = int(s3[0])

if (intW >= intV ) :
    if (intB > intA) :
        print('NO')
        exit()

if (intV >= intW ) :
    if (intA > intB) :
        print('NO')
        exit()

intDiv = abs(intB + intW - intA)
intSpd = abs(intV - intW)
if (intSpd*intT >= intDiv) :
    print('YES')
    exit()
print('NO')

Submission status: Wrong Answer

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

if (B - A) >=  T * (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 a<b and  v>w:
  c=(b-a)/(v-w)
  if t>=c:
    print('YES')
  else:
    print('NO')
else:
  print('NO')