/*	[]__________[][][][]____[][][][][]__{}__[][][][]____[][][][][]__[][][][]
    []__________[]______________[]__________[]__________[]__________[]____[]
    []__________[][][][]________[]__________[][][][]____[]__________[]____[]
    []__________[]______________[]________________[]____[]__[][][]__[]____[]
    []__________[]______________[]________________[]____[]______[]__[]____[]
    [][][][]____[][][][]________[]__________[][][][]____[][][][][]__[][][][]
*/
#include <bits/stdc++.h>
#define ll long long int
#define mod 1000000007
#define endl '\n'
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#define decimal(x) cout<<fixed<<setprecision(x);
bool prime[100005]; 
void Sieve(int n) {
    memset(prime, true, sizeof(prime)); 
  
    for (int p=2; p*p<=n; p++) 
    { 
        if (prime[p] == true) 
        { 
            for (int i=p*p; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
  
} 
void solve()
{
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)cin>>arr[i];
    int g=arr[0];
    int f=0;
    vector<int>v;
    int g2=arr[0];
    for(int i=1;i<n;i++)
    {
        g=__gcd(arr[i-1],arr[i]);
        g2=__gcd(g2,arr[i]);
        if(g!=1)
        {
            f=1;
            v.push_back(g);
        }
    }
    if(f==0)
    {
        cout<<"pairwise coprime"<<endl;
    }
    else if(v.size()==2 && g2==1)
    {
        cout<<"setwise coprime";
    }
    else
    {
        cout<<"not coprime";
    }
    
    
}	
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
      // cin>>t;
    while(t--)
    {
        solve();
    }
}