#include #include using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ vector s(3),t(3); rep(i,3){ cin>>s[i]; } rep(i,3){ cin>>t[i]; } sort(s.begin(),s.end()); sort(t.begin(),t.end()); if(s==t){ cout<<"Yes"<