#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define ull unsigned long long
#define sii set <ll>
#define vi vector <ll>
#define popcount(x) __builtin_popcountll(x)
#define mii map <ll,ll>
#define vpi vector <pair <ll,ll> >
#define sz(c) (int)c.size()
#define fr first
#define ll long long
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define sc second
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define mem0(a) memset(a,0,sizeof(a))
#define rep(i,a,n) for(ll i=a ; i<n ; i++)
#define ld long double
#define rall(a) (a).rbegin(),(a).rend()
#define INF 1000000000
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
 
 
 
ll power(ll b,ll e,ll m)
{
  if(b==0) return 0;
  if(e==0) return 1;
  if(e&1) return b*power(b*b%m,e/2,m)%m;
  return power(b*b%m,e/2,m);
}
ll power( ll b, ll e)
{
  if(b==0) return 0;
  if(e==0) return 1;
  if(e&1) return b*power(b*b,e/2);
  return power(b*b,e/2);
}  
bool isPowerOfTwo(ll x)
{
    // x will check if x == 0 and !(x & (x - 1)) will check if x is a power of 2 or not
    return (x && !(x & (x - 1)));
}

ll vis[1000007];

void solve()
{
  ll n;
  cin>>n;
  ll a[n];
  cin>>a[0];
  ll gcd=a[0];
  rep(i,1,n)
  {
    cin>>a[i];
    gcd=__gcd(gcd,a[i]);
  }
  rep(i,0,n)
  {
    ll x=a[i];
    for(ll j=2;j*j<=x;j++)
    {
      if(x%j==0)
      {
        while(x%j==0)
          x/=j;
        vis[j]++;
      }
    }
    if(x>1) vis[x]++;
  }
  bool flag=false;
  rep(i,2,10000001)
  {
    if(vis[i]>1)
    {
      flag=true;
      break;
    }
  }
  if(gcd==1)
  {
    if(flag) cout<<"setwise coprime";
    else cout<<"pairwise coprime";
  }
  else
  {
    cout<<"not coprime";
  }
}


int main()
{
  fastio
  int tt=1;
  // cin>>tt;
  while(tt--)
  {
    solve();
    cout<<"\n";
  }
  return 0;
}