#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define int ll
#define pb push_back
#define setbits(x)          __builtin_popcountll(x)
#define endl "\n"
typedef long long ll;

#define mx 200002
int dp[mx];
void solve()
{
 int n;
 cin>>n;
 int arr[n];

 for(int i=0;i<n;i++)
    cin>>arr[i];

    for(int i=2;i<mx;i++)
    {  if(!dp[i])
    {
        for(int j=i;j<mx;j+=i)
           dp[j]=i;
    }
    }
    dp[1]=1;
    int ok=1;
    map<int,int> mp;
    for(int i=0;i<n;i++)
    {
        int x=arr[i];

        while(x!=dp[x])
        {if(mp[dp[x]])
        {
            if(mp[dp[x]]!=i+1)
                ok=0;
        }


            mp[dp[x]]=i+1;
            x/=dp[x];
        }
       if(x!=1)
         mp[x]=i+1;
    }
    if(ok)
    {
        cout<<"pairwise coprime"<<endl;
        return;
    }
    int ans=0;
    for(int i=0;i<n;i++)
    {
        ans=__gcd(ans,arr[i]);
    }
    if(ans==1)
    {
        cout<<"setwise coprime"<<endl;
    }
    else
    {
        cout<<"not coprime"<<endl;
    }







}
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
    return 0;
}
