#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
ull gcd(ull a, ull b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  ull prod = 1;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    prod *= a[i];
  }
  int ans = 2;
  for (int i = 0; i < n; ++i) {
    if (gcd(a[i], prod / a[i]) != 1) {
      ans = 1;
      break;
    }
  }
  if (ans == 1) {
    ull result = a[0];
    for (int i = 1; i < n; ++i) {
      result = gcd(result, a[i]);
      if (result == 1) {
        break;
      }
    }
    if (result != 1) {
      ans = 0;
    }
  }
  switch (ans) {
    case 2:
      cout << "pairwise coprime\n";
      break;
    case 1:
      cout << "setwise coprime\n";
      break;
    case 0:
      cout << "not coprime\n";
      break;
  }
}
