#include <bits/stdc++.h>
using namespace std;
int a[1000010], gcd[1000010];
int main() {
  int n;
  scanf("%d", &n);
  int is2 = 0, is1 = 1;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    a[x]++;
    int len = sqrt(x) + 1;
    int flag = 1;
    for (int j = 2; j <= len; j++) {
      if (x % j == 0) {
        if (gcd[j]) {
          flag = 0;
          is1 = 0;
        }
        gcd[j]++;
      }
    }
    if (flag && i != 1) is2 = 1;
  }
  if (is1)
    printf("pairwise coprime\n");
  else if (is2)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
