#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
 
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());
 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

set<int> primes;

int gcd(int a, int b) {
	if (b == 0) {
		return a;
	}

	return gcd(b, a % b);
}

int prime_factors(int n) {
	if (n % 2 == 0) {
		if(primes.find(2) != primes.end()) {
			return 0;
		}

		primes.insert(2);
		while(n % 2 == 0) {
			n = n/ 2;
		}
	}
	
	for (int i = 3; i <= sqrt(n); i+= 2) { 
		if (n % i == 0) {
			if (primes.find(i) != primes.end()) {
				return 0;
			}

			primes.insert(i);
			while(n % i == 0) {
				n = n/i;
			}
		}
	}

	return 1;
} 
 
void c_p_c()
{
   ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);  
   #ifndef ONLINE_JUDGE
	freopen("/home/abhinav/c++ codes/input output c++/input.txt", "r", stdin);
	freopen("/home/abhinav/c++ codes/input output c++/output.txt", "w", stdout);
   #endif
   
   int n;
   cin >> n;
   vector<int> v(n + 1);
   int gc;

   for (int i = 0; i < n; i++) {
   		cin >> v[i];
   		if (i == 0) {
   			gc = v[i];
   		}
   		else
   			gc = gcd(v[i], gc);
   }
   if (gc == 1) {
   		int flag = 1;
   		for (int i = 0; i < n; i++) {
   			flag = prime_factors(v[i]);
   			//cout << flag << endl;
   			if (flag == 0) {
   				break;
   			} 
   		}

   		if (flag == 0) {
   			cout << "setwise coprime";
   		}
   		else {
   			cout << "pairwise coprime";
   		}
    }
    else {
    	cout << "not coprime";
    }
   //cout << gcd(v[0], v[1]);
}
 
int32_t main()
{
    c_p_c();
    return 0;
}