#include <stdio.h>
int main() {
int t;
scanf("%d", &t);
for (int i = 0; i < t; i++) {
int X, Y;
scanf("%d %d", &X, &Y);
//The original code also had a logical error
if (Y >= X && Y <= (X+200)) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
}
Hey @sunny02abhi,
You need hints which explain the solution or hints so that you can find the solution yourself?