#include //#include using namespace std; //using namespace atcoder; using ll = long long; using Graph = vector>; #define rep(i,m,n) for(int (i)=(m);(i)<(n);++(i)) #define rrep(i,m,n) for(int (i)=(n)-1;(i)>=(m);--(i)) #define all(x) (x).begin(),(x).end() #define out(y,x,h,w) (y)<0||(x)<0||(y)>=(h)||(x)>=(w) constexpr ll INF = (ll)1e9; constexpr ll mod = 998244353; constexpr double PI = 3.1415926535897932; templateinline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } templateinline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } inline void init() { cin.tie(nullptr); cout.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); } int main() { init(); vectorvec1(3), vec2(3); rep(i, 0, 3)cin >> vec1[i]; rep(i, 0, 3)cin >> vec2[i]; bool ans = true; auto vec3 = vec1; sort(all(vec1)); sort(all(vec2)); rep(i, 0, 3)if (vec1[i] != vec2[i])ans = false; if (ans) { cout << "Yes" << "\n"; int cnt = 0; rep(i, 0, 3)if (vec3[i] == vec1[i])++cnt; rep(i, 0, 2 - cnt)cout << 2 << "\n"; } else cout << "No" << "\n"; return 0; }