#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U>
using P = pair<T, U>;
template <class T>
using Heap = priority_queue<T>;
template <class T>
using heaP = priority_queue<T, vector<T>, greater<T>>;
template <class T, class U>
using umap = unordered_map<T, U>;
template <class T>
using uset = unordered_set<T>;
template <class T>
bool ChangeMax(T& a, const T& b) {
  if (a >= b) return false;
  a = b;
  return true;
}
template <class T>
bool ChangeMin(T& a, const T& b) {
  if (a <= b) return false;
  a = b;
  return true;
}
template <class T, size_t N, class U>
void Fill(T (&a)[N], const U& v) {
  fill((U*)a, (U*)(a + N), v);
}
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& e : v) is >> e;
  return is;
}
int main() {
  vector<int> plist;
  for (int i = 2; i * i <= 1000000; ++i) {
    bool f = true;
    for (auto e : plist) {
      if (i % e == 0) {
        f = false;
        break;
      }
      if (e * e > i) break;
    }
    if (f) plist.push_back(i);
  }
  int n;
  cin >> n;
  vector<int> mp(1000001);
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    mp[x]++;
    for (auto e : plist) {
      if (e * e > x) break;
      if (x % e == 0) {
        mp[e]++;
        if (e * e != x) mp[x / e]++;
      }
    }
  }
  int maxi = 1;
  for (auto e : plist) {
    maxi = max(maxi, mp[e]);
  }
  if (maxi == 1)
    cout << "pairwise coprime" << endl;
  else if (maxi == n)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
