#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x == 0)
    return y;
  else
    return gcd(y % x, x);
}
int main() {
  int N;
  cin >> N;
  int A[1000000];
  int M = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    M = max(M, A[i]);
  }
  vector<int> p;
  int judge[1000001];
  for (int i = 1; i <= M; i++) judge[i] = 0;
  for (int i = 2; i <= M; i++) {
    if (judge[i] == 0) {
      p.push_back(i);
      for (int j = 2 * i; j <= M; j += i) judge[j] = 1;
    }
  }
  int set = 0;
  for (int i = 0; i < p.size(); i++) {
    int q = p[i];
    int zero = 0;
    for (int j = 0; j < N; j++) {
      if (A[j] % q == 0) zero++;
    }
    if (zero > 1) {
      set = 1;
      break;
    }
  }
  if (set == 0)
    cout << "pairwise coprime" << endl;
  else {
    int g = A[0];
    for (int i = 1; i < N; i++) {
      g = gcd(g, A[i]);
    }
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
