#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int seed = 12289;
const double eps = 1e-6;
const int inf = 0x3f3f3f3f;
const int N = 1e6 + 10;
vector<int> vec[N], pos[N];
int arr[N];
int __gcd(int x, int y) {
  if (x % y == 0) return y;
  return __gcd(y, x % y);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
  }
  int flag = 1;
  for (int i = n; i; i--) {
    int temp = arr[i];
    int sign = 1;
    for (int j = 2; j <= temp; j++) {
      if (temp % j == 0) {
        pos[j].push_back(i);
        if (pos[j].size() != 1) {
          sign = 0;
          break;
        }
      }
      while (temp % j == 0) {
        temp /= j;
      }
    }
    if (sign == 0) {
      flag = 0;
      break;
    }
  }
  int gcd = arr[1];
  for (int i = 1; i <= n; i++) {
    gcd = __gcd(gcd, arr[i]);
  }
  if (flag == 0 && gcd == 1) {
    puts("setwise coprime");
  } else if (flag == 1) {
    puts("pairwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
