n, h = map(int, input().split()) al = list(map(int, input().split())) ans = 1 for a in al: ans *= a ans %= h print('YES' if ans == 0 else 'NO')