Language: C++

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

int main() {
	vector<ii> e(3);
 	for (auto& x : e) cin >> x.first >> x.second;
    sort(e.begin(), e.end());
	do {
    	if (e[0].second == e[1].first && e[1].second == e[2].first && e[0].first != e[2].second) {
          cout << "YES\n";
          return 0;
        }
    } while (next_permutation(e.begin(), e.end());
    cout << "NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'ii' was not declared in this scope
    5 |         vector<ii> e(3);
      |                ^~
a.cc:5:18: error: template argument 1 is invalid
    5 |         vector<ii> e(3);
      |                  ^
a.cc:5:18: error: template argument 2 is invalid
a.cc:6:24: error: 'begin' was not declared in this scope
    6 |         for (auto& x : e) cin >> x.first >> x.second;
      |                        ^
a.cc:6:24: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:6:24: error: 'end' was not declared in this scope
    6 |         for (auto& x : e) cin >> x.first >> x.second;
      |                        ^
a.cc:6:24: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
a.cc:7:12: error: request for member 'begin' in 'e', which is of non-class type 'int'
    7 |     sort(e.begin(), e.end());
      |            ^~~~~
a.cc:7:23: error: request for member 'end' in 'e', which is of non-class type 'int'
    7 |     sort(e.begin(), e.end());
      |                       ^~~
a.cc:9:14: error: invalid types 'int[int]' for array subscript
    9 |         if (e[0].second == e[1].first && e[1].second == e[2].first && e[0].first != e[2].second) {
      |              ^
a.cc:9:29: error: invalid types 'int[int]' for array subscript
    9 |         if (e[0].second == e[1].first && e[1].second == e[2].first && e[0].first != e[2].second) {
      |                             ^
a.cc:9:43: error: invalid types 'int[int]' for array subscript
    9 |         if (e[0].second == e[1].first && e[1].second == e[2].first && e[0].first != e[2].second) {
      |                                           ^
a.cc:9:58: error: invalid types 'int[int]' for array subscript
    9 |         if (e[0].second == e[1].first && e[1].second == e[2].first && e[0].first != e[2].second) {
      |                                                          ^
a.cc:9:72: error: invalid types 'int[int]' for array subscript
    9 |         if (e[0].second == e[1].first && e[1].second == e[2].first && e[0].first != e[2].second) {
      |                                                                        ^
a.cc:9:86: error: invalid types 'int[int]' for array subscript
    9 |         if (e[0].second == e[1].first && e[1].second == e[2].first && e[0].first != e[2].second) {
      |                                                                                      ^
a.cc:13:33: error: request for member 'begin' in 'e', which is of non-class type 'int'
   13 |     } while (next_permutation(e.begin(), e.end());
      |                                 ^~~~~
a.cc:13:44: error: request for member 'end' in 'e', which is of non-class type 'int'
   13 |     } while (next_permutation(e.begin(), e.end());
      |                                            ^~~
a.cc:13:50: error: expected ')' before ';' token
   13 |     } while (next_permutation(e.begin(), e.end());
      |             ~                                    ^
      |                                                  )