print+(join('',sort<>=~/./g)eq join'',sort<>=~/./g)?YES:NO