def f(n,i=2): while i<=n**.5: if n%i: i+=1 else: return False return True print'\n'.join(['%s,%s'%(i-2,i) for i in range(5,2000) if f(i-2)*f(i)])