#include <bits/stdc++.h>
using namespace std;
int n, a[1000005], hcf, pc, sc, nc;
bool prime[1000005];
map<int, int> tim;
int main() {
  for (int i = 1; i <= 1e6; i++) prime[i] = 1;
  prime[1] = 0;
  for (int i = 2; i < 1e6; i++)
    for (int j = 2; i * j <= 1e6; j++) prime[i * j] = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    for (int j = 2; j <= a[i]; j++) {
      if (a[i] % j == 0) tim[j]++;
      while (a[i] % j == 0) a[i] /= j;
      if (prime[a[i]]) {
        tim[a[i]]++;
        break;
      }
    }
  }
  for (int i = 2; i <= 1e6; i++) {
    if (tim[i] == n) {
      nc = 1;
      sc = 0;
      break;
    }
    if (tim[i] > 1) {
      sc = 1;
      nc = 0;
      break;
    }
  }
  if (nc)
    printf("not coprime");
  else if (sc)
    printf("setwise coprime");
  else
    printf("pairwise coprime");
}
