#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;

const int kMaxn = 1e6 + 5;
const int MOD = 1e9 + 7;
int T, N, M, K;
vector<int> fac[kMaxn];
int buck[kMaxn];

int main() {
  //
  scanf("%d", &N);
  M = 1e6;
  for (int i = 2; i <= M; i++)
    for (int j = i; j <= M; j += i) fac[j].push_back(i);
  int d;
  bool flag = true;
  for (int i = 1; i <= N; i++) {
    int x;
    scanf("%d", &x);
    if (i == 1)
      d = x;
    else
      d = __gcd(d, x);
    if (flag) {
      for (int v : fac[x]) {
        buck[v]++;
        if (buck[v] > 1) flag = false;
      }
    }
  }
  if (flag)
    printf("pairwise coprime\n");
  else if (d == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime");
  return 0;
}