/*
  Author - KISHAN TIWARI
  Dream bigger. Do bigger.
  Wake up with determination. Go to bed with satisfaction.
*/
//Sometimes later becomes never. Do it now.
#include<bits/stdc++.h>
using namespace std;
#define ll           long long
#define f(i,a,b)     for(ll i=a;i<b;i++)
#define mod          1000000007
#define fi           first
#define se           second
#define pa           pair <ll,ll>
#define mp           make_pair
#define pb           push_back
#define ve           vector<ll>
#define vep          vector< pa >
#define all(a)       a.begin(), a.end()
#define sz(x)        (ll)x.size()
#define c(t)         cout<<t<<"\n"
using namespace std;

ll gcd(ll a, ll b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}
ll MinimumGCD(ll arr[], ll n)
{
    ll g = mod;

    // Finding GCD of all the
    // elements in the array.
    for (ll i = 0; i < n-1; i++) {
        g =min(g, gcd(arr[i+1], arr[i]));
    }
    return g;
}
ll findMaxGCD(ll arr[], ll n)
{
    // Calculating MAX in array
    ll high = 0;
    for (ll i = 0; i < n; i++)
        high = max(high, arr[i]);

    // Mallaining count array
    ll count[high + 1] = {0};
    for (ll i = 0; i < n; i++)
        count[arr[i]]++;

    ll counter = 0;

    for (ll i = high; i >= 1; i--)
    {
        ll j = i;
       counter = 0;

        while (j <= high)
        {
            // A multiple found

            if(count[j] >=2)
               return j;

           else if (count[j] == 1)
                counter++;

            j += i;
            if (counter == 2)
                return i;
        }
    }
}

void solve()
{
ll n;
cin>>n;
ll a[n];
f(i,0,n)
cin>>a[i];
ll u1=MinimumGCD(a,n);
ll u=findMaxGCD(a,n);
if(u==1||u1==1)
    {cout<<"pairwise coprime\n";
     return;
    }

else
{
    ll f=0;
    f(i,2,n)
    {
        if(a[i]%u!=0||a[i]%u1!=0)
            f=1;
    }
    if(f==0)
        cout<<"not coprime\n";
    else
        cout<<"setwise coprime\n";
}
}
int main()
{
    ios::sync_with_stdio(true);
    /*#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif*/
    cin.tie(0);
    cout.tie(0);
    ll t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
return 0;
}
