#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;

//#define int long long
//signed main(){
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    vector<int> a(n);
    int m=0;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        m=max(m,a[i]);
    }
    int g=a[0];
    for(int i = 0; i < n; i++) {
        g=__gcd(g,a[i]);
    }
    if(g!=1){
        cout << "not coprime" << "\n";
        return 0;
    }

    for(int i = 2; i*i <= m; i++) {
        int cnt=0;
        for(int j = 0; j < n; j++) {
            if(a[j]%i==0) cnt++;
        }
        if(cnt>1){
            cout << "setwise coprime" << "\n";
            return 0;
        }
    }
    cout << "pairwise coprime" << "\n";

    return 0;
}