import sys from functools import reduce import operator def input(): return sys.stdin.readline().rstrip('\n') def main(): n, h = map(int, input().split()) m = lambda x, y: x * y % h a = reduce(m, map(int, input().split()), 1) print('YES' if a == 0 else 'NO') if __name__ == '__main__': main()