sub f{join 0,sort<>=~/./g}print f eq(f)?YES:NO