import java.util.*; public class divisibility { public static void main(String[] args) { Scanner s = new Scanner(System.in); while (true) { String text = s.next(); if (text.equals("end")) break; int num = 0; for (int i = 0; i < text.length(); i++) { num += getNum(text.charAt(i)); } if (num % 61 == 0) System.out.println("yes"); else System.out.println("no"); } } public static int getNum(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'A' && c <= 'Z') return c - 'A' + 10; return c - 'a' + 36; } }