for(;;)print(readline().match(/(\S*) (?!\S*\1)/)?"NO":"YES")