#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define int long long
#define endl "\n"
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define fr(a,b,c) for(int a=b; a<c; a++)
#define frr(a,b,c) for(int a=b;a>=c;a--)
#define pb push_back
#define pii pair<int,int>
#define R(a) ll a; cin >> a;
#define RS(a) string  a; cin >> a;
typedef tree<long long,null_type,greater<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
typedef tree<long long,null_type,less<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set1;

#define RA(a, n) ll a[(n) + 1] = {}; fr(i, 1, (n)+1) {cin >> a[i];}
#define RM(a, n, m) int a[n + 1][m + 1] = {}; fr(i, 1, n+1) {fr(j, 1, m+1) cin >> a[i][j];}
#define reset(X) memset(X, 0, sizeof(X))
using vi=vector<int>;
const int inf = 1e18;
const int mod=1e9+7;
unsigned int power(int x, unsigned int y, int p)
{
    int res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n)
{   if (n <= 1)  return false;
    if (n <= 3)  return true;
    if (n%2 == 0 || n%3 == 0) return false;
    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;
    return true;
}
int modInverse(int n, int p)
{
    return power(n, p-2, p);
}
const int maxn=1e3+5;
bool prime[maxn];
vector<int>v;
bool vis[maxn];
signed main()
{
    fastio;
    prime[1]=1;
    fr(i,2,maxn)
    {
        if(prime[i]==0)
        {for(int j=2*i;j<maxn;j+=i)
        {
            prime[j]=1;
        }

        }
    }
    fr(i,2,maxn)
    {
        if(!prime[i])
        {
            v.pb(i);
        }
    }
    bool f=1;
    R(n);RA(a,n);
    int g=a[1];
    fr(i,1,n+1)
    {
        g=__gcd(g,a[i]);
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=0;j<(int)v.size();j++)
        {
            if(a[i]%v[j]==0)
            {
            if(!vis[v[j]])
            {
                vis[v[j]]=1;
            }
            else
            {
                f=0;
            }
            }
        }
    }
    if(f)
    {
        cout<<"pairwise coprime"<<endl;
    }
    else
    {
        if(g==1)
        {
            cout<<"setwise coprime"<<endl;
        }
        else
        {
            cout<<"not coprime"<<endl;
        }
    }
}
