Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each potion is characterized by two integers — amount of experience and cost. The efficiency of a potion is the ratio of the amount of experience to the cost. Efficiency may be a non-integer number.

For each two integer numbers a and b such that l ≤ a ≤ r and x ≤ b ≤ y there is a potion with experience a and cost b in the store (that is, there are (r - l + 1)·(y - x + 1) potions).

Kirill wants to buy a potion which has efficiency k. Will he be able to do this?


-----Input-----

First string contains five integer numbers l, r, x, y, k (1 ≤ l ≤ r ≤ 10^7, 1 ≤ x ≤ y ≤ 10^7, 1 ≤ k ≤ 10^7).


-----Output-----

Print "YES" without quotes if a potion with efficiency exactly k can be bought in the store and "NO" without quotes otherwise.

You can output each of the letters in any register.


-----Examples-----
Input
1 10 1 10 1

Output
YES
Input
1 5 6 10 1

Output
NO

Difficulty: interview

Starter code:

Solutions:
def list_input():
    return list(map(int,input().split()))
def map_input():
    return map(int,input().split())
def map_string():
    return input().split()
    
l,r,x,y,k = map_input()
ans = "NO"
for i in range(x,y+1):
    if k*i > r:
        break
    elif k*i < l:
        continue
    ans = "YES"
    break
print(ans)

from math import *
import itertools as it
from collections import *

EPS = 1e-9
def get_int()   : return int(input().strip())
def get_string(): return input().strip()
def get_array() : return list(map(int, input().strip().split(' ')))

def print_array(a, glue = ' '):
    print(glue.join(map(str, a)))

def print_grid(grid, glue = ' '):
    for row in grid:
        print_array(row, glue)

#====================================#

def solve():
    l, r, x, y, k = get_array()
    return 'YES' if any(l <= i * k <= r for i in range(x, y + 1)) else 'NO'
    

ntest = 1
# ntest = get_int()
for _ in range(ntest):
    print(solve())


l, r, x, y, k = map(int, input().split())
if l % k != 0:
    l -= l % k
    l += k
r -= r % k
l //= k
r //= k
if max(l, x) <= min(r, y):
    print("YES")
else:
    print("NO")

l, r, x, y, k = list(map(int, input().split()))

ans = "NO"
for b in range(x, y + 1):
    a = k * b
    if l <= a <= r:
        ans = "YES"
        break
print(ans)


# IAWT
l, r, x, y, k = list(map(int, input().split()))
def f():
    for i in range(x, y + 1):
        n = i*k
        if l <= n <= r:
            print("YES")
            return
        if n > r:
            print("NO")
            return
    print("NO")
    return
f()



l, r, x, y, k = map(int, input().split())
low_ex, high_ex = x * k, y * k
if high_ex < l or low_ex > r:
    print('NO')
else:
    low = l // k * k
    up = r // k * k + k
    a = low
    b = low // k
    ok = 0
    while a <= up:
        if x <= b and b <= y and l <= a and a <= r:
            ok = 1
        a += k
        b += 1
    if ok == 1:
        print('YES')
    else:
        print('NO')

l, r, x, y, k = map(int, input().split())
L = x - 1
R = y + 1
while (R - L > 1):
    M = (L + R) // 2
    if (M * k <= r):
        L = M
    else:
        R = M
if (L * k >= l and L != x - 1):
    print("YES")
else:
    print("NO")

def chop():
    return (int(i) for i in input().split())
f=False
l,r,x,y,k=chop()
for i in range(x,y+1):
    if i*k in range(l,r+1):
        f=True
        break
print('YES' if f else 'NO')
    


from bisect import bisect

l,r,x,y,k = [int(x) for x in input().strip().split()]

least = l/y
most = r/x


if (k < least or k > most):
    print("NO")
    return

for i in range(x,y+1):
    if k*i == l + max(0,bisect(range(l, r+1), k*i) - 1):
        print("YES")
        return

print("NO")

import sys

def main():
    x = sys.stdin.readline().split()

    l = int(x[0])
    r = int(x[1])
    xx = int(x[2])
    y = int(x[3])
    k = int(x[4])
    for i in range(xx,y+1):
        p = i*k
        if l <= p and p <= r:
            print("YES")
            return
    print("NO")

def __starting_point():
    main()
__starting_point()

from fractions import Fraction
import math
[startA,endA, startB,endB,efficacy]= input().split("\n")[0].split(" ")

[startA,endA, startB,endB]=map(int, [startA,endA, startB,endB])
res=Fraction(efficacy)
startA_constant=math.ceil(startA/res.numerator)
endA_constant=math.floor(endA/res.numerator)
startB_constant=math.ceil(startB/res.denominator)
endB_constant=math.floor(endB/res.denominator)

if(startA_constant<=endA_constant and startB_constant<=endB_constant and 
	((endA_constant >= startB_constant and endB_constant >= endA_constant) or 
	 (endB_constant >= startA_constant and endA_constant >= endB_constant))):
	print("YES")
else:
	print("NO")

# cook your dish here
l,r,x,y,k=map(int,input().strip().split(' '))
u=0
for i in range(x,y+1):
    if(i*k<=r and i*k>=l):
        u=1
        break
if(u==1):
    print("YES")
else:
    print("NO")

from math import *
l,r,x,y,k = map(int,input().split())
_l = ceil(l / k)
_r = floor(r / k)
if( (_l > _r) or (_l > y) or (x > _r)):
    print("NO")
else:
    print("YES")

l, r, x, y, k = [int(i) for i in input().split()]
for i in range(x, y+1) :
    if k*i <= r and k*i >= l :
        print("YES")
        return
print("NO")


l,r,x,y,k = list(map(int,input().split()))

a = max(k*x,l)
b = min(k*y,r)

a = (a+k-1)//k
b = b//k
if a <= b:
  print('YES')
else:
  print('NO')


def main():
    L, R, X, Y, K = list(map(int, input().split()))

    for i in range(X, Y + 1):
        if L <= i * K <= R:
            ans = 'YES'
            break
    else:
        ans = 'NO'

    print(ans)

main()


3

def read_ints():
	return [int(i) for i in input().split()]

l, r, x, y, k = read_ints()

if x * k <= r and y * k >= l and l // k + (l % k > 0) <= r // k:
	print('YES')
else:
	print('NO')

from sys import stdin
from math import ceil
from math import floor

l, r, x, y, k = list(map(int, stdin.readline().split()))
L = max(l, k * x)
R = min(r, k * y)

L = ceil(L / k)
R = floor(R / k)
print('YES' if R >= L else 'NO')


from sys import stdin, stdout

l, r, x, y, k = list(map(int,stdin.readline().rstrip().split()))

if k*x>r or k*y<l:
    print("NO")
elif int(r/k)==int(l/k) and int(l/k)!=l/k:
    print("NO")
else:
    print("YES")


l,r,x,y,k = list(map(int,input().split()))




def samt(n):
    if k*n > r:
        return 1
    if k*n < l:
        return -1
    return 0

av , ox = x, y

while av < ox + 1:
    n = (av + ox) // 2
    s = samt(n)
    if s == -1:
        av = n + 1
    elif s == 1:
        ox = n - 1
    else:
        break

found = False
for n in range(av, ox + 1):
    if samt(n) == 0:
        found = True

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




l,r,x,y,k=map(int,input().split())
for i in range(x,y+1):
    q=k*i
    if q<=r and q>=l:
        print('YES')
        return
print('NO')

l,r,x,y,k = list(map(int, input().split()))
for i in range(x, y+1):
    if i*k<=r and i*k>=l:
        print('YES')
        break
else:
    print('NO')


l, r, x, y, k = [int(i) for i in input().split()]
for i in range(x, y+1) :
    if k*i <= r and k*i >= l :
        print("YES")
        return
print("NO")

l,r,x,y,k=list(map(int,input().split()))
ans=0
for i in range(x,y+1):
    if (i*k)<=r and (i*k)>=l:
        if (ans == 0):
            print("YES")
            ans=1

if ans == 0:
    print("NO")


l,r,x,y,k = map(int, input().split())
for i in range(x, y+1):
    if i*k<=r and i*k>=l:
        print("YES")
        break
else:
    print("NO")