A, B, C = gets.split.map(&:to_i) X = gets.to_i gcd = [A, B, C].inject(:gcd) if X % gcd == 0 puts "Yes" else puts "No" end