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

const int N = 1e6+10;
int n;
int a[N];

void solve(){
    cin >> n;
    for(int i=0;i<n;++i)
        cin >> a[i];
    int g = a[n-1];
    bool f = 1;
    for(int i=n-2;i>=0;--i) {
        g = __gcd(a[i],g);
        f&=(g==1);
    }
    if(f)
        cout << "pairwise coprime\n"; 
    else if(g==1)
        cout << "setwise coprime\n";
    else 
        cout << "not coprime\n";
}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t=1;
    while(t--)
        solve();
    return  0;
}
