class Calc0166 def initialize(args) args = args.map { |l| l.chomp.split(/\s+/) } @h, @w, @n, @k = args.shift.map(&:to_i) end def calc n = @h * @w % @n n == 0 && @k == @n || @k == n end def run calc ? 'YES' : 'NO' end end puts Calc0166.new(STDIN.readlines).run if __FILE__ == $0