//Deep Godhani
//DAIICT

#include<bits/stdc++.h>
using namespace std;

#define N 100000000000
#define PI acos(-1)
#define INF LONG_LONG_MAX
#define NINF LONG_LONG_MIN
#define ll long long int
#define ld long double
#define precision(x,d) cout << fixed << setprecision(d) << x
#define FAST ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);srand(time(NULL))

void solve()
{
  ll n;
  cin >> n;

  ll a[n];
  set<int> s;
  for(int i=0;i<n;i++)
  {
    cin >> a[i];
  }

  ll ans = a[0];
  for(int i=1;i<n;i++)
  {
    ans = __gcd(ans, a[i]);
    s.insert(ans);
  }

  if(ans > 1)
  {
    cout << "not coprime" << endl;
  }
  else if(ans == 1 && s.size() >= 2)
  {
    cout << "setwise coprime" << endl;
  }
  else
  {
    cout << "pairwise coprime" << endl;
  }
}

int main()
{
    FAST;
    ll t=1;
    //cin >> t;
    while(t--)
    {
      solve();
    }
		return 0;
}
