Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll P = 1e9+7;
const ll N = 1e6+7;


//A sieve to effectivelly factorise numbers in a range(= size)
// A number is a prime if sieve[i] == i;

const ll size = 1e6+7;
vector<	ll> sieve(size);
void factor_sieve()
{
	iota(sieve.begin(),sieve.end(),0);
 
	for(ll i=2;i*i<=size;++i)
	{
		if(sieve.at(i) == i)
		{
			for(ll j = i*2;j<size;j+=i)
				if(sieve.at(j) == j)sieve.at(j) = i;
		}
	}
}


int main(){

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	ll t=1;
	// cin>>t;

	while(t--){
		ll n;
		cin>>n;
		vector<ll> v(n);
		for(ll i=0;i<n;++i) cin>>v[i];

		factor_sieve();
		bool ok = true;
		vector<ll> hash(size);
		for(auto x : v){

			while(x != 1){
				ll f = sieve[x];
				if(hash[f]) {ok = false; break;}
				else hash[f]++;
				while(x%f == 0) x /= f;
			}
		}

		if(!ok){
			ll gg = 0;
			for(auto &x : v) gg = __gcd(gg,x);
			if(gg == 1) cout<<"setwise coprime\n";
			else cout<<"not coprime\n";
		}
		else cout<<"pairwise coprime\n";



	}	

	return 0;
}	

Compiler output:
a.cc:12:19: error: reference to 'size' is ambiguous
   12 | vector< ll> sieve(size);
      |                   ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:11:10: note:                 'const ll size'
   11 | const ll size = 1e6+7;
      |          ^~~~
a.cc: In function 'void factor_sieve()':
a.cc:17:25: error: reference to 'size' is ambiguous
   17 |         for(ll i=2;i*i<=size;++i)
      |                         ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:11:10: note:                 'const ll size'
   11 | const ll size = 1e6+7;
      |          ^~~~
a.cc:21:42: error: reference to 'size' is ambiguous
   21 |                         for(ll j = i*2;j<size;j+=i)
      |                                          ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:11:10: note:                 'const ll size'
   11 | const ll size = 1e6+7;
      |          ^~~~
a.cc: In function 'int main()':
a.cc:45:33: error: reference to 'size' is ambiguous
   45 |                 vector<ll> hash(size);
      |                                 ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:11:10: note:                 'const ll size'
   11 | const ll size = 1e6+7;
      |          ^~~~