/*
======================
[     ___T_          ]
[    | 6=6 | =>HI :-)]
[    |__o__|         ]
[ >===]__o[===<      ]
[     [o__]          ]
[      .".           ]
[      |_|           ]
[                    ]
======================
 */

#include<bits/stdc++.h>
using namespace std;
using lli = int64_t;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int T = 1;
    for(int t = 1; t <= T; t++){
        int n;
        cin >> n;
        int _gcd = 1;
        bool pairwise = true;
        for(int i = 1; i <= n; i++){
            int in;
            cin >> in;
            if(i == 1){
                _gcd = in;
                continue;
            }
            _gcd = __gcd(_gcd,in);
            if(_gcd != 1){
                pairwise = false;
            }
        }
        if(_gcd > 1){
            cout << "not coprime";
        }else{
            if(pairwise){
                cout << "pairwise coprime";
            }else{
                cout << "setwise coprime";
            }
        }
    }
}
