# coding:UTF-8 import sys MOD = 10 ** 9 + 7 INF = float('inf') N, K = list(map(int, input().split())) # スペース区切り連続数字 A = list(map(int, input().split())) # スペース区切り連続数字 nums = set(A) for a in A: if a == 2: if 1 not in nums and 7 in nums: print("No") exit() elif a == 3: if 2 not in nums and 8 in nums: print("No") exit() if 1 not in nums and 6 in nums: print("No") exit() else: if a - 1 not in nums and a + 5 in nums: print("No") exit() if a - 2 not in nums and a + 3 in nums: print("No") exit() if a - 3 not in nums and a + 1 in nums: print("No") exit() print("Yes")