#include <stdio.h>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <ctime>
#include <cstring>
#include <cassert>
#include <bitset>
#include <sstream>
#include <queue>

#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define eprintf(...) fprintf(stderr, __VA_ARGS__)

using namespace std;

typedef long long int64;
typedef long double ldb;

const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = acos(-1);

template <class T> T sqr (T x) {return x * x;}
template <class T> T abs (T x) {return x < 0 ? -x : x;}

const int MAXX = 32000;

vector <int> p[MAXX];

/*

can anyone explain this numCoprime function . Kindly expliain what does this function do ? 

*/
int numCoprime (int x, int right) {
	int numP = sz(p[x]);
	long long res = 0;
	for (int mask = 0; mask < (1 << numP); ++mask) {
		int d = 1;
		int sign = 1;
		for (int i = 0; i < numP; ++i) {
			if ((mask & (1 << i)) != 0) {
				d *= p[x][i];
				sign *= -1;
			}
		}
		res += sign * (right / d);
	}
	return res;
}

int main () {
//  ios_base::sync_with_stdio(0);
//  freopen("input.txt", "rt", stdin);
//  freopen("output.txt", "wt", stdout);

	for (int i = 2; i < MAXX; ++i) {
		int x = i;
		for (int j = 2; j * j <= x; ++j) {
			if (x % j == 0) {
				p[i].pb(j);
				while (x % j == 0) {
					x /= j;
				}
			}
		}
		if (x > 1) {
			p[i].pb(x);
		}
	}
	
	
	
	for (int i=2;i < MAXX;i++){
		cout << i << "------> ";
		for (int j =0;j < p[i].size();j++){
			cout << " " << p[i].at(j);
		}
		cout << endl;
	}
	
	
//	
//	int n;
//	cin >> n;
//
//	long long res = 0;
//	for (int x = 2; x * x <= n; ++x) {
//		res += numCoprime(x, n / x) - numCoprime(x, x);
//	}
//
//	cout << res << endl;
	
	return 0;
}