import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class No908 { public static void main(String[] args) throws IOException{ String inputValue = new BufferedReader(new InputStreamReader(System.in)).readLine(); boolean strFlag = true; for(int i=0;i < inputValue.length();i++){ if((i+1) % 2 == 0 && inputValue.charAt(i) != ' ' || (i+1) % 2 != 0 && inputValue.charAt(i) == ' '){ strFlag = false; break; } } System.out.println(strFlag ? "YES":"NO"); } }