#include using namespace std; using ll = long long; using pll = pair; #define drep(i, cc, n) for (ll i = (cc); i <= (n); ++i) #define rep(i, n) drep(i, 0, n - 1) #define all(a) (a).begin(), (a).end() #define pb push_back #define fi first #define se second const ll MOD = 1000000007; const ll MOD2 = 998244353; const ll INF = 1LL << 60; const ll MAX_N = 2e5; int main(){ vector a(6); rep(i, 6) cin >> a[i]; vector b(6); rep(i, 6) b[i] = a[i]; sort(all(b)); b.erase(unique(all(b)), b.end()); ll n = (ll)b.size(); vector c(6); rep(i, 6) c[i] = lower_bound(all(b), a[i]) - b.begin(); rep(bit, (1<>c[0])&1; ans1 = ~ans1; ans1 = ans1 | ~((bit>>c[1])&1); ans1 = ~ans1; ans1 = ans1 | ~((bit>>c[2])&1); bool ans2 = (bit>>c[3])&1; ans2 = ~ans2; ans2 = ans2 | ~((bit>>c[4])&1); ans2 = ~ans2; ans2 = ans2 | ~((bit>>c[5])&1); bool ans = (~ans1) | (~ans2); if(ans){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; }