n,k = map(int, input().split()) if n%k == 0: for i in range(n//k): print(1, end="") for j in range(n-n//k): print(2, end="") else: print("-1")