#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
     cin>>a[i];
    int tgcd,temp;
    bool f=0;
    tgcd=__gcd(a[0],a[1]);
    temp=__gcd(a[0],a[1]);
    if(temp!=1)
     f=1;
    for(int i=2;i<n;i++)
    {
        tgcd=__gcd(tgcd,a[i]);
        temp=__gcd(a[i-1],a[i]);
        if(temp!=1)
         f=1;
    }
    if(f==1 && tgcd==1)
     cout<<"setwise coprime"<<endl;
    else if(f==1 && tgcd!=1)
     cout<<"not coprime"<<endl;
    else 
     cout<<"pairwise coprime"<<endl;
    return 0;
}