#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int g;
  rep(i, n) {
    cin >> a.at(i);
    if (i == 0) g = a.at(i);
    else g = __gcd(g, a.at(i));
  }

  // GCDが2以上の場合はnot coprime
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }

  // GCDが1の場合
  vector<int> used(1e6+1, false);
  for (int i = 0; i < n; i++) {
    // 素因数分解する
    int x = a.at(i);
    for (int j = 2; j * j <= x; j++) {
      bool counted = false;
      while (x % j == 0) {
        x /= j;
        if (counted) continue;
        if (used.at(j)) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          used.at(j) = true;
        }
        counted = true;
      }
      if (x != 1) {
        if (used.at(x)) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          used.at(x) = true;
        }
      }
    }
  }

  cout << "pairwise coprime" << endl;
  return 0;
}