import java.util.*; public class Main { private static boolean match(String s, int[] perm, String target){ if(s.length() != target.length()) return false; for(int i=0; i<s.length(); i++){ if(s.charAt(perm[i]) != target.charAt(i)) return false; } return true; } public static void main(String[] args) throws Exception{ Scanner sc = new Scanner(System.in); String s = sc.next(); final String target = "kyoprotenkei90"; boolean found = false; //全ての並べ替え方を試します. 14! = 8.7E10[通り]程度なので間に合いません for(int[] perm: new Permutation(target.length())){ if(match(s, perm, target)) found = true; } System.out.println(found ? "Yes" : "No"); } } /*以下, ACLibraryForJavaを利用. 内部実装が気になる人以外は読まなくてOKです*/ /*ドキュメントはこちら→ https://github.com/NASU41/AtCoderLibraryForJava/tree/master/Permutation */ class Permutation implements java.util.Iterator<int[]>, Iterable<int[]> { private int[] next; public Permutation(int n) { next = java.util.stream.IntStream.range(0, n).toArray(); } @Override public boolean hasNext() { return next != null; } @Override public int[] next() { int[] r = next.clone(); next = nextPermutation(next); return r; } @Override public java.util.Iterator<int[]> iterator() { return this; } public static int[] nextPermutation(int[] a) { if (a == null || a.length < 2) return null; int p = 0; for (int i = a.length - 2; i >= 0; i--) { if (a[i] >= a[i + 1]) continue; p = i; break; } int q = 0; for (int i = a.length - 1; i > p; i--) { if (a[i] <= a[p]) continue; q = i; break; } if (p == 0 && q == 0) return null; int temp = a[p]; a[p] = a[q]; a[q] = temp; int l = p, r = a.length; while (++l < --r) { temp = a[l]; a[l] = a[r]; a[r] = temp; } return a; } }