n, m = map(int, input().split()) n -= m l = 1 cnt = 0 if m == 0: cnt += 1 for i in range(2, n+1): if n%i == 0: print(i) cnt += 1 print(cnt)