#include<bits/stdc++.h>
#define ull unsigned long long
# define ll long long
# define mod 1000000007LL 
using namespace std;
int main()
{
     ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    int arr[n];
    int brr[n];
    int fre[1000001]={0};
    for(int i=0;i<n;i++)
    {
    cin>>arr[i];
    brr[i]=arr[i];
    }
    for(int i=0;i<n;i++)
    {
        for(int j=2;j*j<=arr[i];j++)
        {
            if((arr[i]%j)==0)
            fre[j]++;
            while((arr[i]%j)==0)
            {
                arr[i]=arr[i]/j;
            }
        }
        if(arr[i]!=1)
        fre[arr[i]]++;
    }
    sort(fre,fre+500000,greater<int>());
    if(fre[0]==1)
    {
        cout<<"pairwise coprime";
        return 0;
    }
    int ans=__gcd(brr[0],brr[1]);
    for(int i=2;i<n;i++)
    {
        ans=__gcd(ans,brr[i]);
    }
    if(ans==1)
    {
        cout<<"setwise coprime";
        return 0;
    }
    cout<<"not coprime";

    
    
    return 0;
}