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