#include <bits/stdc++.h>
using namespace std;
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline void dump(T& v) {
  for (auto i = v.begin(); i != v.end(); i++) {
    cout << (*i) << ((i == --v.end()) ? '\n' : ' ');
  }
}
inline string getline() {
  string s;
  getline(cin, s);
  return s;
}
inline void yn(const bool b) {
  b ? cout << ("yes") << '\n' : cout << ("no") << '\n';
}
inline void Yn(const bool b) {
  b ? cout << ("Yes") << '\n' : cout << ("No") << '\n';
}
inline void YN(const bool b) {
  b ? cout << ("YES") << '\n' : cout << ("NO") << '\n';
}
struct io {
  io() {
    ios::sync_with_stdio(false);
    cin.tie(0);
  }
};
const int INF = INT_MAX;
constexpr long long int LLINF = 1LL << 60;
constexpr long long int MOD = 1000000007;
constexpr long double EPS = 1e-11;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int ngcd(vector<int>& a) {
  int d = a[0];
  for (int i = 1; i < a.size() && d != 1; i++) d = gcd(a[i], d);
  return d;
}
vector<int> w(1e6 + 10, 0);
void enum_div(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      w[i]++;
      if (i != 1 && i * i != n) {
        w[n / i]++;
      }
    }
  }
  w[n]++;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<int> v(n);
  for (long long int i = 0; i < (n); ++i) scanf("%d", &v[i]);
  if (ngcd(v) != 1) {
    cout << ("not coprime") << '\n';
  } else {
    bool ch = 1;
    for (long long int i = 0; i < (n); ++i) {
      enum_div(v[i]);
    }
    for (int i = 2; i < w.size(); i++) {
      if (w[i] > 1) {
        ch = 0;
        break;
      }
    }
    if (ch) {
      cout << ("pairwise coprime") << '\n';
    } else {
      cout << ("setwise coprime") << '\n';
    }
  }
}
