// code by Juan Torres
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5);
		System.out.println(coffee ? "Yes" : "No");
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5);
		System.out.println(coffee ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5);
		System.out.println(coffee ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5);
		System.out.println(coffee ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5); coffee 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 System.out.println(coffee ? "Yes" : "No") System.out.println System.out System System.out coffee ? "Yes" : "No" coffee "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5);
		System.out.println(coffee ? "Yes" : "No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5);
		System.out.println(coffee ? "Yes" : "No");
	}
} Main
// code by Juan Torres
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		boolean coffee = s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5);
		System.out.println(coffee ? "Yes" : "No");
	}
}
