#include <bits/stdc++.h>
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << '\n'; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  int n;
  cin >> n;
  vector<int> arr(n);
  int e = 0, o = 0;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    if (arr[i] % 2 == 0)
      e++;
    else
      o++;
  }
  unordered_map<int, int> div;
  for (int i = 0; i < n; ++i) {
    for (int j = 1; j * j <= arr[i]; j++) {
      if (arr[i] % j == 0) {
        div[j]++;
        if ((arr[i] / j) != j) {
          div[arr[i] / j]++;
        }
      }
    }
  }
  bool ok = true;
  for (auto it : div) {
    if (it.second > 1 && it.first != 1) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "pairwise coprime";
    return;
  }
  ok = false;
  if (e != 0 && o != 0) {
    ok = true;
  } else if (e == 0) {
    int g = 0;
    for (int i = 0; i, n; ++i) {
      g = gcd(g, arr[i]);
      if (g == 1) {
        ok = true;
        break;
      }
    }
  }
  if (ok) {
    cout << "setwise prime";
    return;
  }
  cout << "not coprime";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  while (T--) {
    solve();
  }
}
