#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int gcd(int a, int b) {
  while (b) {
    int c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  int n, a[1000006] = {}, g = 0, b[1000006] = {};
  vector<int> f[1000006] = {};
  for (int i = 2; i <= 1000000; i++) {
    int j = i;
    for (int k = 2; k * k <= i; k++)
      if (j % k == 0) {
        f[i].push_back(k);
        while (j % k == 0) j /= k;
      }
    if (j > 1) f[i].push_back(j);
  }
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], g = gcd(g, a[i]);
  if (g != 1)
    cout << "not";
  else {
    for (int i = 0; i < n; i++) {
      for (int j : f[a[i]]) b[j]++;
    }
    bool y = 0;
    for (int i = 1; i <= 1000000; i++)
      if (b[i] > 1) {
        y = 1;
        break;
      }
    if (y)
      cout << "setwise";
    else
      cout << "pairwise";
  }
  cout << " coprime";
}
