#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int ddx[8] = {1, 1, 0, -1, -1, -1, 0, 1}, ddy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
void mad(long long &a, long long b) {
  a = (a + b) % 1000000007;
  if (a < 0) a += 1000000007;
}
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
int isp[1000005];
vector<int> prime;
void getprime(int n) {
  for (int i = 2; i < n; i++) {
    if (isp[i] == -1) continue;
    for (int j = 2 * i; j < n; j += i) {
      isp[j] = -1;
    }
    prime.push_back(i);
  }
}
int vis[1000005];
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    vis[a[i]]++;
  }
  int gc = a[0];
  for (int i = 1; i < n; i++) gc = gcd(gc, a[i]);
  bool f = false;
  for (int i : prime) {
    int cnt = 0;
    for (int j = 2 * i; j < 1000005; j += i) cnt += vis[j];
    if (cnt > 1) {
      f = true;
      break;
    }
  }
  if (!f)
    cout << "pairwise coprime";
  else if (gc == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
int main() {
  getprime(1000005);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
