golf暫定最短はcielさんの嘘解法sed $25$byteであった。

implementation

#!/usr/bin/env python3
print(['NO', 'YES'][sorted(input()) == sorted('yahoo')])
#!/bin/sed -f
s/y//
s/a//
s/h//
s/o//
s/o//
/./cNO
cYES