#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 7;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(int arr[], int n) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
void solve() {
  int n, a[1000000];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  bool b = true;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int g = gcd(a[i], a[j]);
      if (g != 1) {
        b = false;
        break;
      }
    }
    if (b == false) break;
  }
  if (b)
    cout << "pairwise coprime" << endl;
  else {
    if (findGCD(a, n) == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
