#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int a[N], n, b[N];
int main() {
  int g = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    g = gcd(a[i], g);
  }
  if (g != 1)
    printf("not coprime");
  else {
    int flag = 1;
    for (int i = 1; i <= n && flag; i++) {
      int temp = (int)sqrt(a[i]);
      for (int j = 2; j <= temp; j++) {
        if (a[i] % j == 0) {
          if (b[j]) {
            flag = 0;
            break;
          }
          b[j] = 1;
          while (a[i] % j == 0) {
            a[i] /= j;
          }
        }
      }
    }
    if (flag)
      printf("pairwise coprime");
    else
      printf("setwise coprime");
  }
  return 0;
}
