#include<bits/stdc++.h>
#define ll long long
using namespace std;
#define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

int arr[500001];
int main()
{
    fast
    int n,z;
    cin>>n;
    int g;
    bool b=1;
    for(int i=0; i<n; i++)
    {
        cin>>z;
        if(i==0)
            g=z;
        else
            g=__gcd(z,g);
        if(b)
        {
            int s=sqrt(z);
            for(int j=2; j<=s; j++)
            {
                if(z%j==0)
                {
                    if(arr[j]!=0)
                        b=0;
                    arr[j]++;
                    while(z%j!=0)
                        z/=j;
                }
            }
            if(z!=1)
            {
                if(arr[z]!=0)
                    b=0;
                arr[z]++;
            }
        }
    }
    if(b)
        cout<<"pairwise coprime";
    else if(g==1)
        cout<<"setwise coprime";
    else
        cout<<"not coprime";







    return 0;
}
