#include<bits/stdc++.h>
using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int n; cin >> n;
	int a[n];
	for(auto &x:a) cin >> x;
	int u=1000005;
	vector<int> least_prime(1000005, 0); 
  
    // We need to print 1 for 1. 
    least_prime[1] = 1; 
  
    for (int i = 2; i <= u; i++) 
    { 
        // least_prime[i] == 0 
        // means it i is prime 
        if (least_prime[i] == 0) 
        { 
            // marking the prime number 
            // as its own lpf 
            least_prime[i] = i; 
  
            // mark it as a divisor for all its 
            // multiples if not already marked 
            for (int j = 2*i; j <= u; j += i) 
                if (least_prime[j] == 0) 
                   least_prime[j] = i; 
        } 
    }
    int ok=1;
    long long done[1000005]={0};
    long long gc=a[0];
    for(auto &x:a){
			//cout << least_prime[x] << endl; 
			done[least_prime[x]]++;
			gc = gcd(gc, x);
			if(done[least_prime[x]]>1) ok=0;
    }

    if(gc!=1) cout << "not coprime" << endl;
    else if(gc==1 && ok==1) cout << "pairwise coprime" << endl;
    else if(gc==1 && ok==0) cout << "setwise coprime" << endl;
}
