    #include <algorithm>
    #include <iostream>
    #include <climits>
    #include <cstring>
    #include <string>
    #include <vector>
    #include <queue>
    #include <cmath>
    #include <set>
    #include <map>

    using namespace std;

    #define all(x) (x).begin(),(x).end()
    #define rall(x) (x).rbegin(),(x).rend()
    #define ll long long
    #define mod 1000000007
    #define vi vector<int>
    #define vll vector<ll>
    #define pb push_back

    ll power(int x, unsigned int y){
        ll res = 1;
        while(y > 0){
            if(y & 1) res = res * x;
            y >>= 1;
            x *= x;
        }
        return res;
    }

    const ll mx = 1e6 + 5;


    // Check for number of Cases!!
    void solve() {
        int n; cin >> n;

        int arr[n];
        ll gcd;

        vector<int> mul_2;

        vector<int> extras;
        map<ll, ll> mp;

        bool one = false;

        for(int i = 0; i < n; i++) {
            cin >> arr[i];
            if(!i) gcd = arr[i];
            else gcd = __gcd((ll)arr[i], gcd);

            if(arr[i] == 1) one = true;
 
            mp[arr[i]]++;
        }

        if(gcd != 1) {
            cout << "not coprime";
            return;
        }

        for(auto i : mp) {
            if(i.second > 1 || one && i.first == 1) {
                cout << "setwise coprime";
                return;
            }
        }

        for(int i = 0; i < n; i++) {
            for(int j = 2; j*j <= arr[i]; j++) {
                if(arr[i] % j == 0) {
                    if(mp[j] || mp[arr[i] / j]) {
                        cout << "setwise coprime";
                        return;
                    }
                    mp[j] = true;
                    mp[arr[i] / j] = true; 
                }
            }
        }

        cout << "pairwise coprime";
    }

    int main(){

        ios_base::sync_with_stdio(false);
        cin.tie(NULL);

        int t = 1;
        // cin >> t;
        while(t--) {
        solve();
        }
    }