fork(4) download
  1. # your code goes here
  2. while True:
  3. a,b = map(int, input().split())
  4. if a == 0 and b == 0:
  5. break
  6. if a % b == 0:
  7. print("factor")
  8. elif b % a == 0:
  9. print("multiple")
  10. else:
  11. print("neither")
Success #stdin #stdout 0.03s 9788KB
stdin
8 16
32 4
17 5
0 0
stdout
multiple
factor
neither