#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
  const char *comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1015;
int vis[N];
vector<int> prime;
void seive() {
  for (int i = 4; i < N; i += 2) vis[i] = 1;
  for (int i = 3; i * i < N; i += 2) {
    if (!vis[i]) {
      for (int j = i * i; j < N; j += 2 * i) vis[j] = 1;
    }
  }
  for (int i = 2; i < N; i++)
    if (!vis[i]) prime.push_back(i);
}
inline int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  seive();
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i += 1) cin >> v[i];
  vector<int> cnt(prime.size(), 0);
  for (int i = 0; i < prime.size(); i++) {
    for (int j = 0; j < n; j++) {
      if (v[j] % prime[i] == 0) cnt[i]++;
    }
  }
  int f1 = 0;
  for (int i = 0; i < prime.size(); i++) {
    if (cnt[i] >= 2) {
      f1 = 1;
      break;
    }
  }
  int f2 = 1;
  int temp = v[0];
  for (int i = 1; i < n; i += 1) {
    temp = gcd(temp, v[i]);
    if (temp == 1) break;
  }
  if (temp == 1) f2 = 0;
  if (f1 == 0)
    cout << "pairwise coprime" << endl;
  else if (f2 == 0)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
