CHEFADV problem

whats the logic behind in in CHEFADV ,i am unbale to find it out need any suggestion or help.
And please check what is wrong in my code.
Thanks in advance :slight_smile:

from sys import stdin 
t = int(input()) 
for i in range(t): 
    n, m, x, y  = map(int, stdin.readline().split()) 
    if (n%x == m%y and abs((n//x)-(m//y))==1):

don’t send your code here its not allowed to send the whole code.

Please don’t ASK for help in a live contest, your account maybe suspended. Discussing and sharing the solution during a contest is not allowed.