#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
int gcd(int a, int b) { return (a % b == 0) ? b : gcd(b, a % b); }
vector<bool> divisor(1e6 + 10, false);
bool flag = true;
void div(int a) {
  if (divisor[a]) flag = false;
  divisor[a] = true;
  for (int i = 2; i * i <= a; ++i) {
    if (a % i == 0) {
      if (divisor[i]) flag = false;
      divisor[i] = true;
      if (i * i == a) continue;
      if (divisor[a / i]) flag = false;
      divisor[a / i] = true;
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto&& e : a) {
    cin >> e;
  }
  for (int i = 0; i < n; ++i) {
    div(a[i]);
  }
  if (flag) {
    cout << "pairwize coprime" << endl;
    return 0;
  }
  int tmp = a[0];
  for (int i = 1; i < n; ++i) {
    tmp = gcd(tmp, a[i]);
  }
  if (tmp == 1)
    cout << "setwize coprime" << endl;
  else
    cout << "not coprime" << endl;
}
