def main(): X, Y = map(int, input().split()) N = int(input()) A_list = list(map(int, input().split())) for i in range(N - 1): t1 = A_list[i] / X t2 = A_list[i + 1] / Y if t1 > t2: print("NO") break else: print("YES") if __name__ == '__main__': main()