#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int gcd(int x, int y) {
  if (x % y == 0) {
    return y;
  } else {
    return gcd(y, x % y);
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  vector<int> cnt(1000001, 0);
  bool pairwise = true;
  for (int ai : a) {
    for (int d = 2; d * d <= ai; d++) {
      if (ai % d == 0) {
        if (cnt.at(d) == 1) {
          pairwise = false;
        }
        cnt.at(d)++;
        if (d != ai / d) {
          if (cnt.at(ai / d) == 1) {
            pairwise = false;
          }
          cnt.at(ai / d)++;
        }
      }
      if (!pairwise) {
        break;
      }
    }
    if (!pairwise) {
      break;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int tmp_gcd = a.at(0);
  bool setwise = false;
  for (int ai : a) {
    int new_gcd = gcd(tmp_gcd, ai);
    if (new_gcd == 1) {
      setwise = true;
      break;
    }
    tmp_gcd = new_gcd;
  }
  if (setwise) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
