#include <bits/stdc++.h>
using namespace std;
constexpr long long int MOD = 1000000007;
constexpr double EPS = 1e-12;
long long int N, M, K, T, H, W, L, R;
vector<int> Prime(int num) {
  vector<int> ret;
  ret.push_back(2);
  ret.push_back(3);
  for (int i = 5; i <= num; i += 6) {
    bool flag = true;
    for (int j = 2; j < ret.size(); j++) {
      if (ret[j] * ret[j] > i) break;
      if (i % ret[j] == 0) {
        flag = false;
        break;
      }
    }
    if (flag) ret.push_back(i);
    flag = true;
    for (int j = 2; j < ret.size(); j++) {
      if (ret[j] * ret[j] > i + 2) break;
      if ((i + 2) % ret[j] == 0) {
        flag = false;
        break;
      }
    }
    if (flag) ret.push_back(i + 2);
  }
  return ret;
}
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  auto P = Prime(1000);
  vector<int> v(N);
  for (auto &i : v) cin >> i;
  int g = 0;
  for (auto i : v) {
    g = gcd(g, i);
  }
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<int> flag(1000001);
  for (auto &i : v) {
    for (auto j : P) {
      if (i % j) continue;
      if (flag[j]) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      flag[j] = 1;
    }
  }
  for (auto i : v) {
    if (i > 1) {
      if (flag[i]) {
        cout << "setwise coprime" << endl;
        return 0;
      } else {
        flag[i] = 1;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
