#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
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 int nax = 1e6 + 10;
vector<int> isp(nax, -1);
void fill() {
  for (long long int i = 2; i < nax; i += 2) isp[i] = 2;
  for (long long int i = 3; i < nax; i += 2) {
    if (isp[i] == -1) isp[i] = i;
    for (long long int j = i * i; j < nax; j += i) {
      if (isp[j] == -1) isp[j] = i;
    }
  }
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  fill();
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = a[0];
  bool okay = true;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int temp = a[i];
    mp[temp]++;
    while (isp[temp] != temp) {
      ;
      temp = isp[temp];
      mp[temp]++;
    }
  };
  for (auto x : mp)
    if (x.second != 1) okay = false;
  if (okay) {
    cout << "pairwise coprime\n";
    return 0;
  }
  g = a[0];
  for (int i = 0; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
