for(;;)print(readline().match(/(\w+) (?!\w*\1)/)?'NO':'YES')