t=[] for i in range(1,10): for j in range(1,10):t.append(i*j) for i in range(100):print(int(int(input())in t))