#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define  pb push_back
#define sort1(v) sort(v.begin(),v.end())
int prime(int x)
{
    for(int i=2;i<=sqrt(x);i++)
    {
        if(x%i==0)
            return 0;
    }
    return 1;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int x[1000000+1];
    for(int i=1;i<=1000000;i++)
        x[i]=0;
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        x[a[i]]++;
    }
    int flag=1;
    int c=2;
    while(c<=1000000)
    {
        int num=c;
        int count=0;
        while(num<=100000)
        {
            count+=x[num];
            num+=c;
        }
        if(count>1)
        {
            flag=0;
            break;
        }
        c++;
    }
    if(flag)
        cout<<"pairwise coprime\n";
    else
    {
        int gcd=a[0];
        for(int i=1;i<n;i++)
        {
            gcd=__gcd(gcd,a[i]);
        }
        if(gcd==1)
            cout<<"setwise coprime\n";
        else
            cout<<"not coprime\n";
    }
}






