#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int a[3], b[3]; cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]; if (a[0] == b[0] && a[1] == b[1] && a[2] == b[2]) { cout << "Yes" << endl; return 0; } else { sort(a, a + 3); sort(b, b + 3); if (a[0] == b[0] && a[1] == b[1] && a[2] == b[2]) { cout << "Yes" << endl; cout << "2" << endl; return 0; } else { cout << "No" << endl; } } return 0; }