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

#define int long long int

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

int p[1000001];
 
void go(){
    for( int i = 2; i*i <= 1000000; i++ ){
        if( p[i] == 0 ){
            for( int j = i; j <= 1000000; j += i ){
                if( p[j] == 0 ){
                    p[j] = i;
                }
            }
        }
    }
    for( int i = 1; i <= 1000000; i++ ){
        if( p[i] == 0 )p[i] = i;
    }
}

int main(){
    go();
    ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif

    int n;
    cin >> n;
    int ar[n];
    for( int i = 0; i < n; i++ ){
        cin >> ar[i];
    }
    map<int,int> cnt;
    for( int i = 0; i < n; i++ ){
        int num = ar[i];
        while( num > 1 ){
            int d = p[num];
            cnt[d]++;
            while( num % d == 0 ){
                num /= d;
            }
        }
    }
    int flag = 1;
    for( auto it : cnt ){
        if( it.second > 1 ){
            flag = 0;
        }
    }
    if( flag ){
        cout << "pairwise coprime";
    }
    else{
        int gc = ar[0];
        for( int i = 1; i < n; i++ ){
            gc = gcd(gc, ar[i]);
        }
        if( gc == 1 ){
            cout << "setwise coprime";
        }
        else{
            cout << "not coprime";
        }
    }
}