#include <bits/stdc++.h>

#include <iostream>
//#include <algorithm>
// #include <iomanip>
#define ll long long
#define map unordered_map
#define set unordered_set
#define l_l pair<ll, ll>
#define vll vector<ll>
#define mll map<ll, ll>

using namespace std;

const ll MOD = 1000000007LL;
const ll INF = (1LL << 60LL);

class Prime {
  ll _size;
  vector<ll> _min;

 public:
  Prime(ll size) {
    _size = size;
    _min.resize(size);

    for (ll i = 2; i < _size; i++) {
      ll cur = i * 2;
      for (;;) {
        if (cur >= _size) {
          break;
        }
        if (_min[cur] != 0) {
          cur += i;
          continue;
        }
        _min[cur] = i;
      }
    }
  }

  void show() {
    for (ll i = 0; i <= 36; i++) {
      cout << i << ":" << _min[i] << endl;
    }
  }

  vector<ll> v(ll num) {
    vector<ll> result;
    for (;;) {
      ll v = _min[num];
      if (v == 0) {
        result.emplace_back(num);
        break;
      }
      num /= v;
      result.emplace_back(v);
    }
    return result;
  }

  map<ll, ll> m(ll num) {
    map<ll, ll> result;
    for (;;) {
      ll v = _min[num];
      if (v == 0) {
        result[num] += 1;
        break;
      }
      num /= v;
      result[v] += 1;
    }
    return result;
  }
};

void calc_cmul(map<ll, ll> &cmul, map<ll, ll> &primes) {
  for (auto e : primes) {
    ll num = e.first;
    ll count = e.second;

    if (cmul[num] < count) {
      cmul[num] = count;
    }
  }
}

int main() {
  ll N;
  scanf("%lld", &N);

  auto prime = Prime(1100000);

  mll sum;

  ll my;

  // vector<ll> list;
  for (ll i = 0; i < N; i++) {
    ll v;
    scanf("%lld", &v);
    // list.emplace_back(v);

    auto m = prime.m(v);

    for (auto ite = m.begin(); ite != end(m); ite++) {
      ll key = (*ite).first;

      sum[key] += 1;
    }

    if (i == 0) {
      my = v;
    } else {
      my = __gcd(my, v);
    }
  }

  //
  bool pairwise_coprime = true;
  for (auto ite = sum.begin(); ite != end(sum); ite++) {
    if ((*ite).second >= 2) {
      pairwise_coprime = false;
      break;
    }
  }
  if (pairwise_coprime) {
    cout << ("pairwise coprime") << endl;
    return 0;
  }

  //
  if (my == 1) {
    cout << ("setwise coprime") << endl;
    return 0;
  }

  //
  cout << "not coprime" << endl;
}
