def a gets.chars.sort end puts a==a ? 'YES': 'NO'