#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<string, int>;
using mp = map<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
vector<int> enum_divisors(int N) {
  vector<int> res;
  for (int i = 1; i * i <= N; ++i) {
    if (N % i == 0) {
      res.push_back(i);
      if (N / i != i) res.push_back(N / i);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
int main(void) {
  int n, cnt = 0;
  cin >> n;
  vector<int> a(n);
  mp m;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    vector<int> tmp = enum_divisors(a[i]);
    for (auto p : tmp) {
      m[p]++;
    }
  }
  for (auto p : m) {
    if (p.first > 1 && p.second == n) {
      cout << "not coprime"
           << "\n";
      return 0;
    }
  }
  for (auto p : m) {
    if (p.first > 1 && 1 < p.second && p.second < n) {
      cout << "setwise coprime"
           << "\n";
      return 0;
    }
  }
  cout << "pairwise coprime"
       << "\n";
  return 0;
}
