#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pair<int, int> > piii;
#define pb push_back
#define NeedForSpeed ios_base::sync_with_stdio(0), cin.tie(0)
#define PI acos(-1)
#define all(c) c.begin(), c.end()
#define SET(x, y) memset((x), y, sizeof(x))
const int MOD = 1e9 + 7;
const int INF = 1e9 + 5;
const ll INF64 = 1e18;

template <typename T>
string to_string(const vector<T> &v) {
  string ret = "<";
  for (auto it : v)
    ret += to_string(it) + ", ";
  ret.pop_back(); ret.pop_back();
  ret += ">";
  return ret;
}

string to_string(const string &s) {
  return '"' + s + '"';
}

string to_string(bool b) {
  return b ? "true" : "false";
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

void debug_print() { cerr << endl; }

template <typename T, typename ...U>
void debug_print(T t, U... u) {
  cerr << " " << to_string(t);
  debug_print(u...);
}

#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_print(__VA_ARGS__)
const int N = 1e6 + 5;

vector<int> v;
bool exist[N];
bool not_prime[N];

bool sieve() {
  for (int i = 0; i < v.size(); i++) {
    exist[v[i]] = true;
    if (v[i] == 1)
      return false;
  }
  for (ll i = 2; i < N; i++) {
    if (!not_prime[i]) {
      int cnt = 0;
      for (int j = i; j < N; j+= i) {
        not_prime[j] = true;
        if (exist[j])
          cnt++;
      }
      if (cnt > 1)
        return false;
    }
  }
  return true;
}

int main() {
  int n;
  cin >> n;
  v.resize(n);
  for (auto &it : v)
    cin >> it;
  if (sieve())
    cout << "pairwise coprime" << '\n';
  else {
    int g = 0;
    for (auto it : v)
      g = __gcd(g, it);
    if (g == 1)
      cout << "setwise coprime" << '\n';
    else cout << "not coprime" << '\n';
  }
  //If you dont need Flush Stream, dont use endl
  return 0;
}
