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

    #define ll long long
    #define ff first
    #define ss second
    #define pb push_back
    #define vll vector<ll>
    #define mll map<ll,ll>
    #define MOD 1000000007
    #define pll pair<ll,ll>
constexpr ll INF = 1999999999999999997; 
    #define fastio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
   #define MAXN   1000005 
  
// stores smallest prime factor for every number 
int spf[MAXN]; 
  
// Calculating SPF (Smallest Prime Factor) for every 
// number till MAXN. 
// Time Complexity : O(nloglogn) 
void sieve() 
{ 
    spf[1] = 1; 
    for (int i=2; i<MAXN; i++) 
  
        // marking smallest prime factor for every 
        // number to be itself. 
        spf[i] = i; 
  
    // separately marking spf for every even 
    // number as 2 
    for (int i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (int i=3; i*i<MAXN; i++) 
    { 
        // checking if i is prime 
        if (spf[i] == i) 
        { 
            // marking SPF for all numbers divisible by i 
            for (int j=i*i; j<MAXN; j+=i) 
  
                // marking spf[j] if it is not  
                // previously marked 
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
} 
  
// A O(log n) function returning primefactorization 
// by dividing by smallest prime factor at every step 
set<int> getFactorization(int x) 
{ 
    set<int> ret; 
    while (x != 1) 
    {  // cout<<spf[x]<<' ';
        ret.insert(spf[x]); 
        x = x / spf[x]; 
    } 
    return ret; 
} 





        int vis[100]={0};

    int main() {
        fastio;
         sieve(); 
       int n;
       cin>>n;
       int a[n];
       int gd=0;
       for(int i=0;i<n;i++)
       {
        cin>>a[i];
        gd=__gcd(a[i],gd);
       }
     // getFactorization(10);
      // cout<<gd<<' ' ;
       if(gd>1)
        { cout<<"not coprime"<<endl;
        
        }
    
     else
     {
        int f=0;
       for(int i=n-1;i>=0;i--)
       {
              set<int> v = getFactorization(a[i]);

              for(auto j: v)
              {  //cout<<j<<' ';
                  if(!vis[j])
                    vis[j]=1;
                  else
                  {
                    f=1;
                    break;
                  }
                  
              }
              if(f)
                break;
           // cout<<endl;
       }

       if(f)
       {
        cout<<"setwise coprime"<<endl;
       }
       else
        cout<<"pairwise coprime"<<endl;


   }



    }