from bisect import bisect_left x, y = map(int, input().split()) n = int(input()) A = list(map(int, input().split())) for i in range(n): t = A[i] / x d = t * y idx = bisect_left(A, d) if idx - i > 1: print("NO") exit() print("YES")