#include using namespace std; #ifdef _RUTHEN #include #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); V A(6); rep(i, 6) cin >> A[i]; sort(A.begin(), A.end()); A.erase(unique(A.begin(), A.end()), A.end()); V B(6); rep(i, 6) B[i] = lower_bound(A.begin(), A.end(), A[i]) - A.begin(); auto f = [](int a, int b) -> bool { return (a & b) ^ 1; }; rep(b, 1 << 6) { if (f(f(f(b >> B[0] & 1, b >> B[1] & 1), b >> B[2] & 1), f(f(b >> B[3] & 1, b >> B[4] & 1), b >> B[5] & 1))) { cout << "YES\n"; return 0; } } cout << "NO\n"; return 0; }