#include <bits/stdc++.h>
using namespace std;
long long INF = LONG_LONG_MAX;
long long mod = 1000000000 + 7;
template <typename T, typename L>
void read(vector<T>& _data, L& _size, bool _shift) {
  _data.resize(_size + (long long)_shift);
  for (long long i = (long long)_shift; i < _size + (long long)_shift; i++)
    cin >> _data[i];
}
template <typename T, typename L>
void read(vector<vector<T>>& _data, L& _rows, L& _cols, bool _shiftRows,
          bool _shiftCols) {
  _data.resize(_rows + (long long)_shiftRows);
  for (long long i = 0; i < _rows + (long long)_shiftRows; i++)
    _data[i].resize(_cols + (long long)_shiftCols);
  for (long long i = (long long)_shiftRows; i < _rows + (long long)_shiftRows;
       i++)
    for (long long j = (long long)_shiftCols; j < _cols + (long long)_shiftCols;
         j++)
      cin >> _data[i][j];
}
template <typename T>
void write(vector<T>& _data, bool _shift) {
  for (long long i = (long long)_shift; i < _data.size(); i++)
    cout << _data[i] << " ";
  cout << endl;
}
long long n;
vector<long long> a;
vector<bool> been;
long long gcd(long long x, long long y) {
  while (x != 0 && y != 0) {
    if (x > y) swap(x, y);
    long long c = y / x;
    y -= c * x;
  }
  return max(x, y);
}
long long gcdall() {
  long long x = a[0];
  for (int i = (1); i < int(n); i++) {
    x = gcd(x, a[i]);
  }
  return x;
}
void solve() {
  cin >> n;
  read(a, n, 0);
  been.resize(1e6 + 1, 0);
  bool pairwise = 1;
  for (long long x : a) {
    if (been[x]) {
      pairwise = 0;
      break;
    }
    for (long long d = 2; d * d <= x; d++) {
      if (x % d == 0) {
        if (been[d] || been[x / d]) {
          pairwise = 0;
          break;
        }
      }
    }
    for (long long d = 2; d * d <= x; d++) {
      if (x % d == 0) {
        been[d] = been[x / d] = 1;
      }
    }
    been[x] = 1;
    if (pairwise == 0) break;
  }
  bool setwise = gcdall() == 1;
  if (pairwise) {
    cout << "pairwise coprime\n";
  } else if (setwise) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
int main() {
  bool _multipleTestCases = false;
  if (_multipleTestCases) {
    long long t;
    cin >> t;
    while (t--) solve();
  } else {
    solve();
  }
  return 0;
}
