N, K = map(int, input().rstrip().split()) if N%3 == 0: ans = False else: ans = False while N >= 1 and K >= 0: if ((N-1)%3 == 0 and (N-1)//3 <= K): ans = True break if N%2 == 0: N //= 2 else: N -= 3 K -= 1 print("YES" if ans else "NO")