#include <bits/stdc++.h>
using namespace std;
bool fg[1000000];
int pri[1000000], a[1000000], n, num = 0, tot[1000000];
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
void work() {
  for (int i = 1; i <= 1000000; i++) fg[i] = false;
  for (int i = 2; i < 1000000; i++) {
    if (!fg[i]) pri[++num] = i;
    for (int j = 1; j <= num; j++) {
      if (i * pri[j] > 1000000) break;
      fg[i * pri[j]] = true;
      if (i % pri[j] == 0) break;
    }
  }
}
int work2() {
  int p = a[1];
  for (int i = 2; i <= n; i++) p = gcd(p, a[i]);
  if (n > num + 1) {
    if (p == 1)
      return 2;
    else
      return 3;
  }
  for (int i = 1; i <= n; i++) tot[a[i]] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= num; j++)
      if (a[i] % pri[j] == 0) {
        if (tot[j] == 1) {
          if (p == 1)
            return 2;
          else
            return 3;
        }
        tot[j] = 1;
        int pp = a[i] / pri[j];
        if (tot[pp] == 1) {
          if (p == 1)
            return 2;
          else
            return 3;
        }
        tot[pp] = 1;
      } else if (pri[j] > trunc(sqrt(a[i])))
        break;
  return 1;
}
int main() {
  scanf("%d", &n);
  work();
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int now = work2();
  if (now == 1)
    cout << "pairwise coprime" << endl;
  else if (now == 2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
