#include<bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 1e6 + 4;

int isprime[MAX];
   //to store smallest prime factor of number
void sieve()
    {
       for(int i = 1;i < MAX;++i)
           isprime[i] = i;

        for(int i = 2;i < MAX;++i)
        {
            if(i == isprime[i])
            {
                for(int j = 2 * i;j <= MAX;j += i)
                {
                    if(isprime[j] == j)
                    isprime[j] = i;
                }
            }
        }

    }
// A O(log n) function returning primefactorization 
 
vector<int>factorize(int x) 
{ 
    vector<int>res; 
    while (x != 1) 
    { 
        res.push_back(isprime[x]); 
        x = x / isprime[x]; 
    } 
    return res; 
} 




signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    sieve();
    
    int testCases = 1;
  //  cin >> testCases;
    
    while(testCases--)
    {
        int n,i;
        cin >> n;
        
        int a[n];
        
        for(i = 0;i < n;++i)
            cin >> a[i];
        
        
        int GCD = a[0];
        for(i = 1;i < n;++i)
        {
           GCD = __gcd(GCD,a[i]);
            
        }
        map<int,int>mp;
        for(i = 0;i < n;++i)
        {
            vector<int>y = factorize(a[i]);
            set<int>X;
            
            for(int e : y)
                X.insert(e);
            
            for(auto e : X)
                mp[e]++;
            
        }
        bool flg = false;
        for(auto it : mp)
        {
            if(it.second > 1)
            {
                flg = true;
                break;
            }
        }
        
        if(!flg and GCD == 1)
        {
            cout << "pairwise coprime";
        }
        else{
            if(GCD == 1)
                cout << "setwise coprime";
            else
                cout << "no coprime";
        }
       
        cout << '\n';
    }
    
}
