import sys sys.setrecursionlimit(10**6) n,k = map(int,input().split()) dic = {} def dfs(x,left): if (x,left) in dic: return dic[(x,left)] if x < 1: return 0 if x == 1: return 1 if left == 0 and x != 1: return 0 if (x-1)%3 == 0 and (x-1)//3 <= left: check = 1 dic[(x,left)] = check return check check = 0 if x%2 == 0: check |= dfs(x//2,left-1) else: check |= dfs(x-3,left-1) dic[(x,left)] = check return check print("YES" if dfs(n,k) else "NO")