#include <bits/stdc++.h>

using namespace std;
int a[1000005];
bool v[1000005];

int main(){
    int n;
    cin >> n;
    bool pair = false;
    int num;
    for(int i = 0; i < n; ++i){
        cin >> num;
        ++a[num];
    }
    for(int i = 2; i <= 1000000; ++i)
        if(!v[i]){
            int t = 0;
            for(int j = 1; j * i <= 1000000; ++j){
                t += a[j * i];
                v[j * i] = true;
            }
            if(t == n){
                cout << "not coprime\n";
                return 0;
            }else if(t >= 2)
                pair = true;
        }

    if(pair)
        cout << "setwise coprime\n";
    else
        cout << "pairwise coprime\n";
    return 0;
}
