public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		StringBuilder out = new StringBuilder();
		while ((line = in.readLine()) != null && line.length() != 0) {
			if (line.trim().equals("0"))
				break;
			a = readInts(line.split(": ")[1]);
			out.append(isAntiarithmetic() ? "yes\n" : "no\n");
		}
		System.out.print(out);
	}