#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
inline long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long lowbit(long long x) { return (x & -x); }
bool has[N], ok = true, notprime[N], vis[N];
int n, GCD, x;
vector<int> prime, e[N];
void init() {
  for (int i = 2; i <= 1e6; i++)
    if (!notprime[i]) {
      e[i].push_back(i);
      for (int j = i + i; j <= 1e6; j += i)
        notprime[j] = true, e[j].push_back(i);
    }
}
int main() {
  scanf("%d", &n);
  init();
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    GCD = gcd(GCD, x);
    if (!ok) continue;
    if (has[x])
      ok = false;
    else {
      has[x] = true;
      for (int j = 0; j < e[x].size(); j++)
        if (vis[e[x][j]])
          ok = false;
        else
          vis[e[x][j]] = true;
    }
  }
  if (ok)
    printf("pairwise coprime\n");
  else if (GCD == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
