#!/usr/bin/python

def factors(n):
  for i in range(2,n):
    if (n % i == 0): yield i

for a in factors(42):
  print a