#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int gcd(int a, int b) {
  int r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  int N;
  cin >> N;
  int maxnum = 1e6 + 1;
  vector<int> A(maxnum, 0);
  int a;
  for (int i = 0; i < N; i++) {
    cin >> a;
    A[a]++;
  }
  int cnt = 0;
  int flag = 1;
  for (int i = 2; i < maxnum; i++) {
    cnt = 0;
    for (int j = i; j < maxnum; j += i) {
      cnt += A[j];
    }
    if (cnt > 1) {
      flag = 0;
      break;
    }
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = -1;
  for (int i = 0; i < maxnum; i++) {
    if (g == -1 && A[i] > 0) {
      g = i;
      cout << g << endl;
    } else if (A[i] > 0) {
      g = gcd(g, i);
    }
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
