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