#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
#define f(i,a,b) for(ll i=a;i<b;i++)
#define rf(i,a,b) for(ll i=a;i>=b;i--)
#define sf(i,s) for(ll i=0;s[i]!='\0';i++)
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define inf 1e18
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define tr(v,i) for(typeof(v).begin() i = v.begin(); i != v.end(); i++)
#define pre(v,x) (v.find(x) != v.end())
#define vpre(v,x) (find(all(v),x) != v.end())
#define gcd(x,y) __gcd(x,y)
#define bc(x) __builtin_popcountll(x)
//cin.ignore(1, '\n');
ll power(ll a, ll b)
{
    if (b == 0)
        return 1;
    if (b == 1)
        return a % mod;
    else
    {
        ll t = power(a, b / 2);
        if (b % 2 == 0)
            return ((t % mod) * (t % mod)) % mod;
        else
            return ((((t % mod) * (t % mod)) % mod) * ((a % mod) % mod)) % mod;
    }
}
void solve()
{
  ll n1,i,hcf,c=0,j;
  map<ll,ll>m;
  cin>>n1;
  ll a[n1+1];
  f(i,0,n1)
  {
      cin>>a[i];
  }
  f(j,0,n1)
  {
      ll n=a[j];
      m[n]++;
      for( i=2;i*i<=n;i++)
      {
          if(n%i==0)
          {
              if(i==n/i)
              {
                  m[i]++;
                  if(m[i]>1)
                  {
                      c=1;
                      break;
                  }
              }
              else
              {
              m[i]++;
              if(m[i]>1)
              {
                  c=1;
                  break;
              }
              m[n/i]++;
              if(m[n/i]>1)
              {
                  c=1;
                  break;
              }
              }
          }
      }
      if(c==1)
      {
          break;
      }
  }
  if(c!=1)
  {
      cout<<"pairwise coprime";
  }
  else
  {
      hcf=a[0];
      for(i=1;i<n1;i++)
      {
          hcf=gcd(hcf,a[i]);
      }
      if(hcf==1)
      cout<<"setwise coprime";
      else
      {
          cout<<"not coprime";
      }
  }
  
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll t = 1;
  //  cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
