#include <cassert>
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <limits>
#include <bitset>
#include <functional>
#include <type_traits>
#include <queue>
#include <stack>
#include <array>
#include <random>
#include <utility>
#include <cstdlib>
#include <ctime>

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,n0,n) for(int i=n0;i<n;i++)
#define Com(i,j,n) for(int i=0;i<n-1;i++)for(int j=i+1;j<n;j++)
const long long INF = 1e10;
const int MOD = (int)1e9+7;
const double EPS = 1e-9;
typedef long long ll;
typedef long li;
#define pb push_back
#define mp make_pair

struct cww
{
  cww()
  {
    ios::sync_with_stdio(false);
    cin.tie(0);
  }
} star;

std::vector<int> Eratosthenes(const int N)
{
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++)
  {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (int i = 2; i <= N; i++)
  {
    if (is_prime[i])
    {
      for (int j = 2 * i; j <= N; j += i)
      {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}

signed main (){
  ll n;
  cin >> n;

  ll arr[n];
  rep(i, n){
    cin >> arr[i];
  }

  std::vector<int> primes = Eratosthenes(1000000);

  ll tmp;
  tmp = arr[0];
  ll all_gdc = tmp;
  std::set<ll> all_elm;
  rep(i, primes.size())
  {
    if (tmp < primes[i]) {
      break;
    }
    if (tmp % primes[i] == 0) {
      while (tmp % primes[i] == 0)
      {
        tmp /= primes[i];
      }
      tmp /= primes[i];
      all_elm.insert(primes[i]);
    }
  }

  ll not_pflag = 0;
  ll prim;
  Rep(i, 1, n)
  {
    tmp = arr[i];
    all_gdc = std::gcd(all_gdc, tmp);
    for (auto itr = all_elm.begin(); itr != all_elm.end(); ++itr)
    {
      prim = *itr;
      if (tmp < prim)
      {
        break;
      }
      if (tmp % prim == 0)
      {
        while (tmp % prim == 0)
        {
          tmp /= prim;
        }
        if (all_elm.find(prim) != all_elm.end())
        {
          not_pflag = 1;
        }
        else
        {
          all_elm.insert(prim);
        }
      }
    }

    vector<ll> intersection;
  }

  if (not_pflag == 0){
    cout << "pairwise coprime" << endl;
  }
  if (all_gdc != 1)
  {
    cout << "setwise coprime" << endl;
  }
  else
  {
    cout << "not coprime" << endl;
  }
}
