#!/usr/bin/env PyPy3 from collections import Counter, defaultdict, deque import itertools import re import math from functools import reduce import operator import bisect from heapq import * import functools mod=998244353 import sys input=sys.stdin.readline a,b,c=map(int,input().split()) x = int(input()) gc = math.gcd(a,b) gc = math.gcd(gc,c) if x % gc == 0: print('Yes') else: print('No')