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
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):
print("Chefirnemo")
else:
print("Pofik")