// -- Nitin
#include <bits/stdc++.h>
#define pb push_back
#define mkp make_pair
#define llu unsigned long long int
#define ll long long
#define ld long double
#define foi(a,n) for(int i = a; i < (int)n; i++)
#define foj(a,n) for(int j = a; j < (int)n; j++)
#define foin(a,n) for(int i = n; i >= a; i--)
#define fojn(a,n) for(int j = n; j >= a; j--)
#define bug(x) cerr << #x << " is " << x << endl;
#define isp2(x) x&&(!(x&(x-1)))
#define ln '\n'
#define ee 1000000007
#define eem 998244353
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define cases int tests; cin >> tests; while(tests--)

using namespace std;

// Union find
#define MAXN 200002
int parent[MAXN], sz[MAXN];
int fset(int v) {
    if (v == parent[v])
        return v;
    return parent[v] = fset(parent[v]);
}
void mkset(int v) {
    parent[v] = v;
    sz[v] = 1;
}
void usets(int a, int b) {
    a = fset(a);
    b = fset(b);
    if (a != b) {
        if (sz[a] < sz[b])
            swap(a, b);
        parent[b] = a;
        sz[a] += sz[b];
    }
}

int main(){
    fio;
	ll n, m, k;
	
    //~ cases
    
    {	
		string t[3] = {"pairwise coprime", "setwise coprime", "not coprime"};
		cin >> n;
		int a[n];
		foi(0, n){
			cin >> a[i];
		}
		int g = a[0];
		foi(1, n){
			g = __gcd(a[i], g);
		}
		if(g != 1) cout << t[2];
		else{
			if(n > 78498){
				cout << t[1];
			}
			else{
				set<int> s;
				foi(0, n){
					s.insert(a[i]);
				}
				if(s.size() < n) {
					cout << t[1];
					cerr << "size < n\n";
				}
				else{
					bool ch = true;
					s.clear();
					for(int i = 0; i < n; i++){
						if(a[i]%2 == 0 && s.find(2) != s.end()){
							ch = false;
							cerr << "for 2\n";
							break;
						}
						else if(a[i]%2 == 0) s.insert(2);
						while(a[i]%2 == 0){
							a[i] >>= 1;
						}
						for(int j = 3; j*j <= a[i]; j += 2){
							if(a[i] % j == 0){
								if(s.find(j) != s.end()){
									ch = false;
									cerr << "for " << j << "\n";
									break;
								}
								else s.insert(j);
								while(a[i]%j == 0){
									a[i] /= j;
								}
							}
							if(!ch) break;
						}
						if(!ch) break;
					}
					if(ch) cout << t[0];
					else cout << t[1];
				}
			}
		}
	}
}
       
        
