#include <bits/stdc++.h>
using namespace std;
const int N(1e6 + 5);
unordered_map<int, int> freq;
int n, x, d, p;
bool ok(true), curr;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<vector<int>> factori(n + 1);
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    d = 2;
    while (x != 1) {
      p = 0;
      while (x % d == 0) x /= d, p = 1;
      if (p) {
        ++freq[d];
        factori[i].emplace_back(d);
      }
      if (d == 2)
        d = 3;
      else
        d += 2;
      if (d * d > x) d = x;
    }
  }
  for (int i = 1; i <= n && ok; ++i)
    for (const int& d : factori[i]) {
      if (freq[d] != 1) ok = false;
      break;
    }
  if (ok) {
    cout << "pairwise coprime";
    exit(0);
  }
  ok = true;
  for (int i = 1; i <= n; ++i) {
    curr = false;
    for (const int& d : factori[i])
      if (freq[d] != n) {
        curr = true;
        break;
      }
    if (!curr) {
      ok = false;
      break;
    }
  }
  if (ok)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  exit(0);
}
