import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String k = "No";
		String i = kb.next();
		if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes";
		System.out.println(k);
		kb.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String k = "No";
		String i = kb.next();
		if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes";
		System.out.println(k);
		kb.close();
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String k = "No";
		String i = kb.next();
		if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes";
		System.out.println(k);
		kb.close();
	} main {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String k = "No";
		String i = kb.next();
		if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes";
		System.out.println(k);
		kb.close();
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) String k = "No"; k "No" String i = kb.next(); i kb.next() kb.next kb if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes"; (i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)) (i.charAt(2) == i.charAt(3)) i.charAt(2) i.charAt i 2 i.charAt(3) i.charAt i 3 (i.charAt(4) == i.charAt(5)) i.charAt(4) i.charAt i 4 i.charAt(5) i.charAt i 5 k = "Yes" k "Yes" System.out.println(k) System.out.println System.out System System.out k kb.close() kb.close kb String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String k = "No";
		String i = kb.next();
		if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes";
		System.out.println(k);
		kb.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String k = "No";
		String i = kb.next();
		if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes";
		System.out.println(k);
		kb.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String k = "No";
		String i = kb.next();
		if ((i.charAt(2) == i.charAt(3)) && (i.charAt(4) == i.charAt(5)))
			k = "Yes";
		System.out.println(k);
		kb.close();
	}

}
