#include #include using namespace std; int main(int argc, char* argv[]) { string S1; string S2; cin>>S1; cin>>S2; if (S1.length()!=S2.length()){ cout<<"NO"<