#include<bits/stdc++.h>

#define fast ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define int long long
#define endl '\n'

using namespace std;

const int N = 2e6 + 77;
int A[N];

int32_t main(){
    int n ; cin >> n ;
    for(int i = 0 ; i < n ; ++i) cin >> A[i];
    int g = A[0];
    bool pp = 1, sp = 1;
    for(int i = 1 ; i < n; ++i){
        g = __gcd(g,A[i]);
        if(__gcd(A[i],A[i-1]) != 1) pp = false;
    }
    if(g!=1) sp = false;
    if(pp) cout << "pairwise coprime" << endl;
    else if(sp) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
}