for x in xrange(3,2001): if 0 not in [x%y for y in xrange(2,x/2+1)] and 0 not in [(x+2)%k for k in xrange(2,x/2+1)]:print "%s,%s" % (x,x+2)