#include <iostream> 
#include <algorithm> 
int fact[1000008] ={0};
bool status = false;
using namespace std;
void facti(int n)
{
    for(long long int i=2;i*i<=(long long int)n;i++)
    {
        if(status == true)
        {
            return;
        }
        if(n%i==0)
        {
            int a = n/i;
            int b= n/a;
            if(a!=b)
            {
                if(fact[a])
                {
                    status = true;
                    return;
                }
                fact[a]++;
                if(fact[b])
                {
                    status = true;
                    return;
                }
                fact[b]++;
            }
            else
            {
                if(fact[a])
                {
                    status = true;
                    return;
                }
                fact[a]++;
            }
        }
    }
}
int main()
{
    int n;cin>>n;
    int arr[n+1];
    for(int i =0;i<n;i++)
    {
        cin>>arr[i];
    }
    //finding setwise gcd;
    
    int gcdans = arr[0];
    facti(arr[0]);
    fact[arr[0]]++;
    for(int i=1;i<n;i++)
    {
        facti(arr[i]);
        fact[arr[i]]++;
        gcdans = __gcd(arr[i],gcdans);
    }
    
    if(status==false)
    {
        cout<<"pairwise coprime\n";
    }
    else if(gcdans==1)
    {
       cout<<"setwise coprime\n";
    }
    else
    {
        cout<<"not coprime\n";
    }

    return 0;
}
