from math import gcd a, b, c = map(int, input().split()) x = int(input()) try: print("Yes" if x % gcd(abs(a - b), gcd(abs(b - c), abs(c - a))) == 0 else "No") except: print("Yes")