import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
	 	Scanner scanner = new Scanner(System.in);
	 	String S = scanner.next();
		String[] splitArray = S.split("");
		String x = splitArray[2];
		String y = splitArray[3];
		String z = splitArray[4];
		String w = splitArray[5];
		if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
	 	Scanner scanner = new Scanner(System.in);
	 	String S = scanner.next();
		String[] splitArray = S.split("");
		String x = splitArray[2];
		String y = splitArray[3];
		String z = splitArray[4];
		String w = splitArray[5];
		if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
	 	Scanner scanner = new Scanner(System.in);
	 	String S = scanner.next();
		String[] splitArray = S.split("");
		String x = splitArray[2];
		String y = splitArray[3];
		String z = splitArray[4];
		String w = splitArray[5];
		if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
	 	Scanner scanner = new Scanner(System.in);
	 	String S = scanner.next();
		String[] splitArray = S.split("");
		String x = splitArray[2];
		String y = splitArray[3];
		String z = splitArray[4];
		String w = splitArray[5];
		if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner String[] splitArray = S.split(""); splitArray S.split("") S.split S "" String x = splitArray[2]; x splitArray[2] splitArray 2 String y = splitArray[3]; y splitArray[3] splitArray 3 String z = splitArray[4]; z splitArray[4] splitArray 4 String w = splitArray[5]; w splitArray[5] splitArray 5 if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} x.equals(y) && z.equals(w) x.equals(y) x.equals x y z.equals(w) z.equals z w {
			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 scanner = new Scanner(System.in);
	 	String S = scanner.next();
		String[] splitArray = S.split("");
		String x = splitArray[2];
		String y = splitArray[3];
		String z = splitArray[4];
		String w = splitArray[5];
		if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {
	 	Scanner scanner = new Scanner(System.in);
	 	String S = scanner.next();
		String[] splitArray = S.split("");
		String x = splitArray[2];
		String y = splitArray[3];
		String z = splitArray[4];
		String w = splitArray[5];
		if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
	 	Scanner scanner = new Scanner(System.in);
	 	String S = scanner.next();
		String[] splitArray = S.split("");
		String x = splitArray[2];
		String y = splitArray[3];
		String z = splitArray[4];
		String w = splitArray[5];
		if (x.equals(y) && z.equals(w)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
