暴力 循环扫一遍才能完全确定是否符合
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <ctype.h>
#include <vector>
#include <algorithm>
#include <sstream>
#define PI acos(-1.0)
#define in freopen("in.txt", "r", stdin)
#define out freopen("out.txt", "w", stdout)
using namespace std;
typedef long long ll;
const int maxn = 500 + 7, INF = 0x3f3f3f3f, mod = 1e9 + 7;
ll l, r, x, y, k;
int main() {
scanf("%ld %ld %ld %ld %ld", &l, &r, &x, &y, &k);
if(l > r) swap(l, r);
if(x > y) swap(x, y);
for(ll i = x; i <= y; ++i) {
ll t = i * k;
if(t >= l && t <= r) { puts("YES"); return 0;}
}
puts("NO");
return 0;
}