Language: C++

#include "vector"
#include "iostream"

using namespace std;

int main()
{
	int x, y;
	cin >> x >> y;
	vector<int> a = { 1, 3, 5, 7, 8, 10, 12 };
	vector<int> b = {4, 6, 9, 11};
	vector<int> c = {2};
	auto rax = find(a.begin(), a.end(), x);
	auto ray = find(a.begin(), a.end(), y);
	auto rbx = find(b.begin(), b.end(), x);
	auto rby = find(b.begin(), b.end(), y);
	auto rcx = find(c.begin(), c.end(), x);
	auto rcy = find(c.begin(), c.end(), y);
	if (rax != a.end() && ray != a.end())
	{
		cout << "Yes" << endl;
		return 0;
	}
	else if(rbx != b.end() && rby != b.end())
	{
		cout << "Yes" << endl;
		return 0;
	}
	else if (rcx != c.end() && rcy != c.end())
	{
		cout << "Yes" << endl;
		return 0;
	}
	cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   13 |         auto rax = find(a.begin(), a.end(), x);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:13:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >'
   13 |         auto rax = find(a.begin(), a.end(), x);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   14 |         auto ray = find(a.begin(), a.end(), y);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:14:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >'
   14 |         auto ray = find(a.begin(), a.end(), y);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:15:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   15 |         auto rbx = find(b.begin(), b.end(), x);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:15:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >'
   15 |         auto rbx = find(b.begin(), b.end(), x);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:16:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   16 |         auto rby = find(b.begin(), b.end(), y);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:16:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >'
   16 |         auto rby = find(b.begin(), b.end(), y);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:17:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   17 |         auto rcx = find(c.begin(), c.end(), x);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:17:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >'
   17 |         auto rcx = find(c.begin(), c.end(), x);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:18:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   18 |         auto rcy = find(c.begin(), c.end(), y);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:18:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >'
   18 |         auto rcy = find(c.begin(), c.end(), y);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~