#!/bin/ruby
require 'prime'
prm=Prime.instance.each.first(1500)
lcm=2
start=2
ncmp=1
x=1
factors=[2]
while ncmp<1500
  start+=lcm
  if (start+ncmp)%prm[x]==0 then
    ncmp+=1
    factors<< prm[x]
    lcm*=prm[x]
    x+=1
    while true
      f=false
      (0...x).each do |e|
        if (start+ncmp)%prm[e]==0 then
          f=true
          factors<< prm[e]
          ncmp+=1
          break
        end
      end
      break if f
    end
  end
end
n=gets.to_i
puts start,factors[0...n]