#include using namespace std; using namespace chrono; int main() { vector as(3), bs(3); for (auto &&a : as) { cin >> a; } for (auto &&b : bs) { cin >> b; } if (multiset(as.begin(), as.end()) == multiset(bs.begin(), bs.end())) { cout << "Yes" << endl; cout << 2 << endl; cout << 2 << endl; } else { cout << "No" << endl; } return 0; }