Can Pay Exact Amount (ax + by = c)
Print YES if integers x and y (possibly negative) exist with a*x + b*y = c, otherwise NO.
Constraints
1 <= a, b <= 10^9 |c| <= 10^18
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.