#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); vector a(3), b(3); for (int i = 0; i < 3; i++) { cin >> a[i]; } for (int i = 0; i < 3; i++) { cin >> b[i]; } bool hoge = (a == b); sort(a.begin(), a.end()); sort(b.begin(), b.end()); if (a == b) { cout << "Yes\n"; cout << 2 << newl; } else { cout << "No\n"; } return 0; }