#include<iostream>
using namespace std;
int res[1000001];
#include<cmath>
#include<algorithm>
int main()
{
    int n;
    cin>>n;
    int arr[n];
    for(int i=0; i<n; i++)
        cin>>arr[i];
    int flag=0;
    for(int i=0; i<n; i++) {
        int x=ceil(sqrt(arr[i]));
        for(int j=2; j<=x; j++) {
            if(arr[i]%j==0) {
                if(res[j]>0 && res[j]!=i+1)
                    flag=1;
                if(res[arr[i]/j]>0 && res[arr[i]/j]!=i+1)
                    flag=1;
                if(flag)break;
                res[j]=i+1;
                res[arr[i]/j]=i+1;
            }
        }
        if(flag)break;
    }
    if(!flag)
        cout<<"pairwise coprime"<<endl;
    else {
        int gd=0;
        for(int i=0; i<n; i++)
            gd=__gcd(gd,arr[i]);
        if(gd==1)
            cout<<"setwise coprime"<<endl;
        else
            cout<<"not coprime"<<endl;

    }
    return 0;
}