#include <bits/stdc++.h>
using namespace std;
bool arr[10001];
long long num[1000001], N, sumofnum[1000001];
vector<long long> P;
int GCD(int a, int b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
void Initialize_Prime(long long MAX) {
  for (long long i = 2; i <= sqrt(MAX); i++) {
    if (!arr[i]) {
      P.push_back(i);
      long long j = 2;
      while (j * i <= MAX) {
        arr[j * i] = true;
        j++;
      }
    }
  }
  for (long long i = sqrt(MAX) + 1; i <= MAX; i++) {
    if (!arr[i]) P.push_back(i);
  }
}
void Input() {
  cin >> N;
  for (long long i = 0; i < N; i++) {
    cin >> num[i];
    sumofnum[num[i]]++;
  }
  Initialize_Prime(1000);
}
void Solve() {
  bool paired = true, total = true;
  for (long long i = 0; i < N; i++) {
    if (sumofnum[num[i]] > 1) paired = false;
  }
  for (long long i = 0; i < P.size(); i++) {
    long long sum = 0;
    for (long long j = 0; j < N; j++) {
      if (num[j] % P[i] == 0) sum++;
    }
    if (sum > 1) {
      paired = false;
      break;
    }
  }
  int fpb = num[0];
  for (long long i = 1; i < N; i++) {
    fpb = GCD(fpb, num[i]);
  }
  if (paired) {
    cout << "pairwise coprime" << '\n';
  } else if (fpb == 1) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
}
int main() {
  Input();
  Solve();
}
