#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())) { int cnt = 0; for (int i = 0; i < 3; i++) { if (as[i] != bs[i]) { cnt++; } } cout << (cnt + 1) / 2 << endl; } else { cout << "No" << endl; } return 0; }