import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[2000000];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays 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);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[2000000];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[2000000];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[2000000];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc List<String> list=new ArrayList<String>(Arrays.asList(s.split(""))); list new ArrayList<String>(Arrays.asList(s.split(""))) if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No"); list.get(2).equals(list.get(3)) list.get(2).equals list.get(2) list.get list 2 list.get(3) list.get list 3 {
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		} if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No"); list.get(4).equals(list.get(5)) list.get(4).equals list.get(4) list.get list 4 list.get(5) list.get list 5 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "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);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[2000000];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[2000000];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[2000000];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		if(list.get(2).equals(list.get(3))){
			if(list.get(4).equals(list.get(5)))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

	}
}