import math def main(): X,A,Y,B = map(int, input().split( )) if X**A % Y**B==0: print("Yes") else: print("No") if __name__ == '__main__': main()