#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long LINF = 1e18;
const int INF = 0x3f3f3f3f;
const int MAXN = 1000050;
int a[MAXN], vis[MAXN], avis[MAXN];
vector<int> p;
bool get_prime(int maxx) {
  for (int i = 2; i <= maxx; i++) {
    if (vis[i]) continue;
    vis[i] = 1;
    p.push_back(i);
    for (int j = 1; j * i <= maxx; j++) {
      if (avis[i * j]) {
        if (vis[i] == 2) return 0;
        vis[i] = 2;
      }
      if (!vis[i * j]) vis[i * j] = 1;
    }
  }
  return 1;
}
int gcd(int t, int b) {
  if (t < b) swap(t, b);
  if (t % b == 0)
    return b;
  else
    return gcd(b, t % b);
}
void solve(int T) {
  int n, maxx = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    maxx = max(maxx, a[i]);
    avis[a[i]] = 1;
  }
  int gcdd = a[1];
  for (int i = 2; i <= n; i++) {
    gcdd = gcd(a[i], gcdd);
  }
  if (get_prime(maxx)) {
    puts("pairwise coprime");
  } else if (gcdd == 1) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
}
signed main() {
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve(i);
  }
}
