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


string solve(int arr[], int n){

    int g = arr[0];
    int countEven = arr[0]%2 == 0;
    int MAX = 0;
    for(int i=1; i<n; i++){
        g = __gcd(g, arr[i]);
        if(arr[i]%2 == 0)
            countEven++;
        if(arr[i] > MAX)
            MAX = arr[i];
    }

    if(g > 1){
        return "not coprime";
    }
    if(countEven >= 2){
        return "setwise coprime";
    }

    // Build sieve
    // Now the array can be either pairwise or setwise
    // If any 2 of the array element has same prime factors
    // then not pairwise coprime

    unordered_map<int, int> m;
    for(int i=0; i<n; i++)
        m[arr[i]]++;

    vector<bool> sieve(MAX+1, true);

    for(int i=2; i*i<=MAX; i++){
        if(sieve[i]){
            int cnt = 0;
            for(int j=i; j<=MAX; j+=i){
                sieve[j] = false;
                if(m.find(j) != m.end())
                    cnt += m[j];
            }
            if(cnt > 1)
                return "setwise coprime";
        }
    }
    return "pairwise coprime";
}

int main()
{
 int n;
 cin>>n;
 int arr[n];
 for(int i=0; i<n; i++)
    cin>>arr[i];
 string ans = solve(arr, n);
 cout<<ans;
 return 0;
}

