#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i,s,f) for(i=s;i<f;i++)
#define print(v) for(auto &z:v) cout<<z<<' ';cout<<'\n'
#define db cout<<"db: "
#define pb push_back
#define pii pair<int,int>
#define F first
#define S second
#define B begin()
#define E end()
#define all(v) v.B,v.E
#define sz(v) (int)((v).size())
#define vi vector<int>
#define vii vector<pair<int,int>>
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define clk1 clock_t start_time=clock()
#define clk2 cout<<(clock()-start_time)/(double)CLOCKS_PER_SEC
#define clean(arr) memset(arr,0,sizeof(arr))
#define mod 1000000007
#define mod2 998244353
#define space 1000005
//<<fixed << setprecision(9)

void err(int x)
{
    if(x) cout<<"setwise coprime";
    else cout<<"not coprime";
    exit(0);
}
int main()
{
    int n,i,j,t;
    boost;

    cin>>n;
    int arr[n];
    rep(i,0,n)
    {
        cin>>arr[i];
    }

    bool seen[space]={0};
    bool f=0;
    int g=arr[0];
    rep(i,1,n) g=__gcd(arr[i],g);
    if(g==1) f=1;

    for(i=n-1;i>=0;i--)
    {
        for(j=2;j*j<=arr[i];j++)
        {
            if(arr[i]%j==0)
            {
                if(seen[j]) err(f);
                seen[j]=1;
                while(arr[i]%j==0) arr[i]/=j;
            }
        }
    }
    cout<<"pairwise coprime";

    return 0;
}