#include <fstream>
#include <cmath>

using namespace std;

int soNguyenTo(int soA)
{
    if (soA < 2)    
        return 0;

    for (int i = 2; i <= sqrt((float)soA); i ++)
    {
        if (soA%i==0)
        {
            return 0;
        }
    }
    return 1;
}

int main(){
	long long N;
	ifstream fi;
	fi.open("DE005.INP");
	fi>>N;
	fi.close();
	ofstream fo;
	fo.open("DE005.OUT");
    long long f0=1,f1=1,f2;
    if (N<2){fo<<"-1";}
    while (f0<=N){
    	f2=f1+f0;
    	if (soNguyenTo(f0)==1){fo<<f0<<" ";}
    	f0=f1;
    	f1=f2;	
	}
}
