#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int tmp;
  if (a < b) {
    tmp = a;
    a = b;
    b = tmp;
  }
  while (b != 0) {
    tmp = a % b;
    a = b;
    b = tmp;
  }
  return a;
}
int isSet(int* arr, int n) {
  sort(arr, arr + n);
  int min = arr[0];
  int cnt = 0;
  int len = min / 2;
  for (int i = 2; i <= len; i++) {
    for (int j = 0; j < n; j++) {
      if (arr[j] % i == 0)
        cnt++;
      else {
        cnt = 0;
        break;
      }
    }
    if (cnt == n) return 0;
    cnt = 0;
  }
  return 1;
}
int main() {
  int N;
  scanf("%d", &N);
  int* arr = new int[N];
  for (int i = 0; i < N; i++) scanf("%d", &arr[i]);
  bool flag = false;
  for (int i = 0; i < N; i++) {
    if (flag) break;
    for (int j = i + 1; j < N; j++) {
      if (gcd(arr[i], arr[j]) != 1) {
        flag = true;
        break;
      }
    }
  }
  if (!flag)
    printf("pairwise coprime");
  else {
    if (isSet(arr, N))
      printf("setwise coprime");
    else {
      printf("not coprime");
    }
  }
  delete[] arr;
  return 0;
}
