#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 1;
int n, m, arr[N], prime[N], ans = 1, inArray[N];
void sieve(){
    for(int i = 2; i < N; i++){
        int cnt = 0;
        if(!prime[i])
        for(int j = i + i; j < N; j += i){
            prime[j] = 1;
            cnt += inArray[j];
        }
        if(cnt >= 2){ans = i;}
    }
}
int main(){
    cin >> n ;
    int GCD = 0;
    for(int i = 0; i < n; i++){
        cin >> arr[i];
        inArray[arr[i]]++;
        GCD = __gcd(arr[i], GCD);
    }
    sieve();
    if(ans == 1){
        cout << "pairwise coprime" << endl;
    }else if(GCD == 1)
        cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    
    return 0;
}