#define _USE_MATH_DEFINES #include using namespace std; //template #define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define ALL(v) (v).begin(),(v).end() typedef long long int ll; const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12; templateinline bool chmax(T& a,T b){if(ainline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} //end int main(){ int a[3],b[3]; rep(i,0,3)cin>>a[i]; rep(i,0,3)cin>>b[i]; sort(a,a+3); sort(b,b+3); if(a[0]==b[0] and a[1]==b[1] and a[2]==b[2])puts("Yes"); else puts("No"); return 0; }