#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define VI vector<int>
#define VVI vector<vector<int>>
#define UM unordered_map
#define MP map
#define ST set
#define US unordered_set
#define V vector
#define S string
#define D deque
#define L list
#define Q queue
#define PQ priority_queue
#define D deque
#define PII pair<int, int>
#define P pair
#define DB double
#define LDB long double
#define FOR(i, n) for (int i = 0; i < (n); ++i)
#define FFOR(i, n) for (int i = 0; i <= (n); ++i)
#define RFOR(i, n) for (int i = (n)-1; i >= 0; --i)
#define all(grid) (grid).begin(), (grid).end()
#define rall(grid) (grid).rbegin(), (grid).rend()

const int dr[] = {0, 1, 0, -1};
const int dc[] = {1, 0, -1, 0};

template <typename T>
void read(T& a) {
  a = 0;
  char c;
  while ((c = cin.peek()) < 48 or c > 57) cin.get();
  while ((c = cin.get()) > 47 and c < 58) a = (a << 3) + (a << 1) + c - 48;
}

template <typename T, typename... Args>
void read(T& a, Args&&... args) {
  read(a);
  read(forward<Args>(args...)...);
}

template <typename T>
void write(const S& sep, const S& end, T n) {
  char c[128] = {0};
  int i = 0;
  for (; n; ++i, n /= 10) c[i] = n % 10;

  for (--i; i >= 0; --i) cout.put(c[i] + 48);

  cout.write(end.c_str(), end.size() * sizeof(char));
}

template <typename T, typename... Args>
void write(const S& sep, const S& end, T n, Args&&... args) {
  char c[128] = {0};
  int i = 0;
  for (; n; ++i, n /= 10) c[i] = n % 10;

  for (--i; i >= 0; --i) cout.put(c[i] + 48);

  cout.write(sep.c_str(), sep.size() * sizeof(char));
  write(sep, end, forward<Args>(args...)...);
}
int primes[] = {2,   3,   5,   7,   11,  13,  17,  19,  23,  29,  31,  37,  41,
                43,  47,  53,  59,  61,  67,  71,  73,  79,  83,  89,  97,  101,
                103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167,
                173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239,
                241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313,
                317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397,
                401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467,
                479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569,
                571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643,
                647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733,
                739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823,
                827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911,
                919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
void solve() {
  int n;
  cin >> n;
  UM<int, int> m;
  FOR(i, n) {
    int t;
    cin >> t;
    FOR(j, 168) {
      if (t == 1) break;
      if (t % primes[j] == 0) ++m[primes[j]];
      while (t % primes[j] == 0) t /= primes[j];
    }
    if (t != 1) ++m[t];
  }
  bool one = true, all = false;
  for (auto [_, cnt] : m) {
    // cout << _ << "\n";
    one &= cnt == 1;
    all |= cnt == n;
  }
  if (one)
    cout << "pairwise coprime";
  else if (not all)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}


Measured memory_bytes: 6592