#include <bits/stdc++.h>
using namespace std;
const int N = 1e6+1;
int m[N],vis[N];
int main(){
    ios_base::sync_with_stdio(false), cin.tie(nullptr);
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<N;i++)
        m[i] = vis[i] = 0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        m[a[i]]++;
    }
    
    bool check = 0;
    for(int i=2;i<N;i++)
    {   
        
        if(!vis[i])
        {   
            int count = 0;
            for(int j = 2*i;j<N;j+=i)
                {vis[j] = 1; count+=m[j];}
            if(count > 1)
                {check = 1; break;}
        }
        
    }
    if(check == 0)
        {cout<<"pairwise coprime"; return 0;}
    int g = a[0];
    for(int i=1;i<n;i++)
        g = __gcd(g,a[i]);
    if(g == 1)
        cout<<"setwise coprime";
    else
        cout<<"not coprime";
    return 0;
    
}