#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(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long mod = 1e9 + 7;
const long long N = 4e5 + 5;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
void solve() {
  long long n;
  cin >> n;
  ;
  vector<long long> a(n);
  for (auto &i : a) cin >> i;
  ;
  long long to = gcd(a[0], a[1]);
  for (long long i = 2; i < (long long)a.size(); i++) {
    to = gcd(to, a[i]);
  }
  map<long long, long long> cnt;
  for (long long i = 0; i < (long long)a.size(); i++) {
    for (long long j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cnt[j]++;
        while (a[i] % j == 0) {
          a[i] /= j;
        }
      }
    }
    if (a[i] > 1) {
      cnt[a[i]]++;
    }
  }
  bool f = 0;
  for (auto i : cnt) {
    if (i.second > 1) {
      f = 1;
      break;
    }
  }
  if (f == 0) {
    cout << "pairwise coprime"
         << "\n";
    ;
    return;
  }
  if (to == 1) {
    cout << "setwise coprime"
         << "\n";
    ;
    return;
  }
  cout << "not coprime"
       << "\n";
  ;
}
int32_t main() {
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
