import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			String str = sc.next();
			
			String str3 = str.substring(2, 3);
			String str4 = str.substring(3, 4);
			String str5 = str.substring(4, 5);
			String str6 = str.substring(5, 6);
				
			if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				}
			}
		
} import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Deque; Deque java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			String str = sc.next();
			
			String str3 = str.substring(2, 3);
			String str4 = str.substring(3, 4);
			String str5 = str.substring(4, 5);
			String str6 = str.substring(5, 6);
				
			if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				}
			}
		
} Main public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			String str = sc.next();
			
			String str3 = str.substring(2, 3);
			String str4 = str.substring(3, 4);
			String str5 = str.substring(4, 5);
			String str6 = str.substring(5, 6);
				
			if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				}
			} main {

			Scanner sc = new Scanner(System.in);
			String str = sc.next();
			
			String str3 = str.substring(2, 3);
			String str4 = str.substring(3, 4);
			String str5 = str.substring(4, 5);
			String str6 = str.substring(5, 6);
				
			if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				}
			} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String str3 = str.substring(2, 3); str3 str.substring(2, 3) str.substring str 2 3 String str4 = str.substring(3, 4); str4 str.substring(3, 4) str.substring str 3 4 String str5 = str.substring(4, 5); str5 str.substring(4, 5) str.substring str 4 5 String str6 = str.substring(5, 6); str6 str.substring(5, 6) str.substring str 5 6 if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				} str3.equals(str4) && str5.equals(str6) str3.equals(str4) str3.equals str3 str4 str5.equals(str6) str5.equals str5 str6 {
				System.out.println("Yes");
			} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
				System.out.println("No");
				} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			String str = sc.next();
			
			String str3 = str.substring(2, 3);
			String str4 = str.substring(3, 4);
			String str5 = str.substring(4, 5);
			String str6 = str.substring(5, 6);
				
			if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				}
			}
		
} public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			String str = sc.next();
			
			String str3 = str.substring(2, 3);
			String str4 = str.substring(3, 4);
			String str5 = str.substring(4, 5);
			String str6 = str.substring(5, 6);
				
			if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				}
			}
		
} Main
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			String str = sc.next();
			
			String str3 = str.substring(2, 3);
			String str4 = str.substring(3, 4);
			String str5 = str.substring(4, 5);
			String str6 = str.substring(5, 6);
				
			if(str3.equals(str4) && str5.equals(str6)) {
				System.out.println("Yes");
			}else {
				System.out.println("No");
				}
			}
		
}