#include "bits/stdc++.h"
#define int long long int
#define pb push_back
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define vvi vector<vector<int>>
#define vi vector<int>
#define f first
#define s second
using namespace std;
const int mod = 1e9 + 7;
vvi adj(3e6);
vi prime(3e6, 1);
/*

*/
void sieve()
{
  prime[0] = prime[1] = 0;
  for (int i = 2; i * i <= 1000000; i++)
  {
    if (prime[i])
    {
      for (int j = i + i; j <= 1000000; j += i)
      {
        prime[j] = 0;
        adj[j].push_back(i);
      }
    }
  }
  for (int i = 2; i <= 1000000; i++)
  {
    if (prime[i])adj[i].push_back(i);
  }
}

int solve() {
  sieve();
  //for (auto it : adj[10]) cout << it << " ";
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++)
  {
    cin >> v[i];
  }
  map<int, int> mp;
  int flag = 0;
  for (int i = 0; i < n; i++)
  {
    int x = v[i];
    for (auto it : adj[x])
    {
      if (mp[it])
      {
        flag = 1;
        break;
      }
      else mp[it] = 1;
      //cout << it << " ";
    }
    //cout << '\n';
    if (flag == 1)
    {
      break;
    }
  }
  if (flag == 0)cout << "pairwise coprime";
  else
  {
    int gcd = v[0];
    for (int i = 1; i < n; i++)
    {
      gcd = __gcd(gcd, v[i]);
    }
    if (gcd == 1)cout << "setwise coprime";
    else cout << "not coprime";
  }
  return 0;
}
int32_t main() {
  fast;
  int t = 1;
  //cin >> t;
  while (t--)
  {
    solve();
  }
  return 0;
}