#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int temp = a;
  if (a > b) {
    temp = a;
    a = b;
    b = temp;
  }
  while (temp != 0) {
    temp = b % a;
    if (temp == 0)
      return a;
    else {
      b = a;
      a = temp;
    }
  }
  return a;
}
int a[1000010];
int main() {
  int N;
  cin >> N;
  int i, j;
  for (i = 0; i < N; i++) {
    cin >> a[i];
  }
  int temp = a[0];
  int flag = 1;
  int gcdall = 0;
  for (i = 0; i < N; i++) {
    for (j = i + 1; j < N; j++) {
      if (gcd(a[i], a[j]) == 1) gcdall = 1;
      if (gcd(a[i], a[j]) != 1) {
        flag = 0;
        if (i != 0) break;
        temp = gcd(temp, a[j]);
      }
    }
    if (i == 0) gcdall = temp;
    if (!flag) break;
  }
  if (gcdall == 1) {
    if (flag)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  } else
    cout << "not coprime" << endl;
  return 0;
}
