Last active
October 10, 2023 15:21
-
-
Save SpikeVN/517fd202ac538306e2c7812f02b7b529 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = int(input()) | |
data = [] | |
for _ in range(n): | |
l = [int(i) for i in input().split()] | |
next_line = False | |
for na in range(1, l[0] + 1): | |
for nb in range(1, l[1] + 1): | |
if na * l[2] + nb * 1 == l[3]: | |
next_line = True | |
print("YES") | |
break | |
if next_line: | |
break | |
else: | |
print("NO") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment