#include<bits/stdc++.h>
using namespace std;
const int maxs = 1e6 + 4;
bool prime[maxs];
void sieve() 
{  
    memset(prime, true, sizeof(prime)); 
    prime[1] = false;
    for(int p = 2; p * p <= maxs; p++) 
    { 
        if (prime[p] == true) 
        { 
            for(int i = p * p; i <= maxs; i += p) 
                prime[i] = false; 
        } 
    } 
} 



signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    sieve();
    vector<int>X;
    for(int i = 1;i < maxs;++i)
    {
        if(prime[i])
            X.push_back(i);
    }
    
    
  //  cout << X.size() << '\n';
    
    
    int testCases = 1;
  //  cin >> testCases;
    
    while(testCases--)
    {
        int n,i;
        cin >> n;
        int GCD = 0;
        
        int a[n];
        
        for(i = 0;i < n;++i)
        {
            cin >> a[i];
            GCD = __gcd(GCD,a[i]);
        }
        
        bool flg = false;
        
        for(int e : X)
        {
            int cnt = 0;
            for(i = 0;i < n;++i)
            {
               if(a[i] % e == 0)
                    cnt++;
            }
            
            if(cnt > 1)
            {
                flg = true;
                break;
            }
        }
        
        if(!flg)
        {
            cout << "pairwise coprime";
        }
        else{
            if(GCD == 1)
                cout << "setwise coprime";
            else
                cout << "no coprime";
        }
       
        cout << '\n';
    }
    
}
