use std::io::{self, BufRead}; fn main() { let input = io::stdin() .lock() .lines() .map(std::result::Result::unwrap) .collect::>(); let mut s1 = input[0].chars().collect::>(); s1.sort_unstable(); let mut s2 = input[1].chars().collect::>(); s2.sort_unstable(); if s1 == s2 { println!("YES"); } else { println!("NO"); } }