import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args) throws Exception {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		String s = in.readLine();
		
		System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No");
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

	public static void main(String[] args) throws Exception {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		String s = in.readLine();
		
		System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No");
	}
} Main public static void main(String[] args) throws Exception {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		String s = in.readLine();
		
		System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No");
	} main {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		String s = in.readLine();
		
		System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No");
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String s = in.readLine(); s in.readLine() in.readLine in System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No") System.out.println System.out System System.out (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No" (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) s.charAt(2) == s.charAt(3) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 s.charAt(4) == s.charAt(5) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		String s = in.readLine();
		
		System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No");
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		String s = in.readLine();
		
		System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No");
	}
} Main
import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args) throws Exception {
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		String s = in.readLine();
		
		System.out.println((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes": "No");
	}
}
