#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(vector<vector<T>> x) {
  cerr << "\n{";
  int f = x.size();
  for (int i = 0; i < f; i++) {
    cerr << "(";
    int g = x[i].size();
    for (auto j : x[i]) {
      cerr << j;
      (--g != 0) ? cerr << "," : cerr << "";
    }
    cerr << ")\n";
  }
  cerr << "}";
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void __print(vector<bool> x) {
  cerr << "{";
  int f = x.size();
  for (auto i : x) {
    cerr << i;
    (--f != 0) ? cerr << "," : cerr << "";
  }
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
template <typename... T>
void read(T &...args) {
  ((cin >> args), ...);
}
template <typename... T>
void writ(T &&...args) {
  ((cout << args << " "), ...);
}
unsigned long long g_cd(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  a %= b;
  return g_cd(b, a);
}
unsigned long long l_cm(unsigned long long a, unsigned long long b) {
  return (a * b) / g_cd(a, b);
}
unsigned long long pro(unsigned long long a, unsigned long long b) {
  return a * b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  unsigned long long n;
  cin >> n;
  unsigned long long an = 0;
  vector<unsigned long long> arr(n);
  for (auto &i : arr) {
    cin >> i;
  }
  unsigned long long x1 = arr[0];
  unsigned long long x = accumulate(arr.begin(), arr.end(), x1, g_cd);
  if (x > 1) {
    cout << "not coprime" << endl;
    return 0;
  } else {
    an = 1;
    unsigned long long g = accumulate(arr.begin(), arr.end(), 1, l_cm);
    unsigned long long pr = accumulate(arr.begin(), arr.end(), 1, pro);
    if (g == pr) an = 2;
  }
  if (an == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
