import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf = br.readLine();

		// 整数の入力

		System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No");
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf = br.readLine();

		// 整数の入力

		System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No");
	}
} Main public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf = br.readLine();

		// 整数の入力

		System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf = br.readLine();

		// 整数の入力

		System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String buf = br.readLine(); buf br.readLine() br.readLine br System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No") System.out.println System.out System System.out buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No" buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) buf.charAt(2) == buf.charAt(3) buf.charAt(2) buf.charAt buf 2 buf.charAt(3) buf.charAt buf 3 buf.charAt(4) == buf.charAt(5) buf.charAt(4) buf.charAt buf 4 buf.charAt(5) buf.charAt buf 5 "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf = br.readLine();

		// 整数の入力

		System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No");
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf = br.readLine();

		// 整数の入力

		System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No");
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf = br.readLine();

		// 整数の入力

		System.out.println(buf.charAt(2) == buf.charAt(3) && buf.charAt(4) == buf.charAt(5) ? "Yes" : "No");
	}
}