#include <bits/stdc++.h>
const int MAXN = 1e6 + 10;
using namespace std;
int n, a[MAXN], sum, flag;
int gcd(int a, int b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2 == 0) sum++;
    if (sum == 2) flag = 1;
  }
  sort(a + 1, a + n + 1);
  if (n % 2 == 0) {
    for (int i = 1; i <= n; i += 2) {
      int now = gcd(a[i], a[i + 1]);
      if (now != 1) {
        flag = 1;
        break;
      }
    }
  } else {
    for (int i = 1; i <= n - 1; i += 2) {
      int now = gcd(a[i], a[i + 1]);
      if (now != 1) {
        flag = 1;
        break;
      }
    }
    if (gcd(a[n], a[n - 1]) != 1) {
      flag = 1;
    }
  }
  if (flag) {
    int now = a[1];
    for (int i = 2; i <= n; i++) {
      now = gcd(now, a[i]);
    }
    if (now == 1)
      printf("setwise coprime");
    else
      printf("not coprime");
  } else {
    printf("pairwise coprime");
  }
  return 0;
}
