import java.util.*;
import java.io.*;

public class Main {

	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static int nextInt() throws IOException {
		return Integer.parseInt(br.readLine());
	}

	public static int[] nextArr() throws IOException {
		String elements[] = br.readLine().split(" ");
		int arr[] = new int[elements.length];
		for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]);
		return arr;
	}

	public static void printArr(int arr[]) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr);
	}

	public static String next() throws IOException {
		return br.readLine();
	}

	public static void main(String[] args) throws IOException {

		
			String line = next();
			if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No");

		
	}

} import java.util.*; util.* java import java.io.*; io.* java public class Main {

	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static int nextInt() throws IOException {
		return Integer.parseInt(br.readLine());
	}

	public static int[] nextArr() throws IOException {
		String elements[] = br.readLine().split(" ");
		int arr[] = new int[elements.length];
		for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]);
		return arr;
	}

	public static void printArr(int arr[]) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr);
	}

	public static String next() throws IOException {
		return br.readLine();
	}

	public static void main(String[] args) throws IOException {

		
			String line = next();
			if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No");

		
	}

} Main static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) public static int nextInt() throws IOException {
		return Integer.parseInt(br.readLine());
	} nextInt {
		return Integer.parseInt(br.readLine());
	} return Integer.parseInt(br.readLine()); Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br public static int[] nextArr() throws IOException {
		String elements[] = br.readLine().split(" ");
		int arr[] = new int[elements.length];
		for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]);
		return arr;
	} nextArr {
		String elements[] = br.readLine().split(" ");
		int arr[] = new int[elements.length];
		for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]);
		return arr;
	} String elements[] = br.readLine().split(" "); elements br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int arr[] = new int[elements.length]; arr new int[elements.length] elements.length elements elements.length for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]); int j = 0; int j = 0; j 0 j < elements.length j elements.length elements elements.length j++ j++ j arr[j] = Integer.parseInt(elements[j]); arr[j] = Integer.parseInt(elements[j]) arr[j] arr j Integer.parseInt(elements[j]) Integer.parseInt Integer elements[j] elements j return arr; arr public static void printArr(int arr[]) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr);
	} printArr {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr);
	} for (int i = 0; i < arr.length; i++)
			System.out.print(arr); int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i System.out.print(arr); System.out.print(arr) System.out.print System.out System System.out arr int arr[] arr public static String next() throws IOException {
		return br.readLine();
	} next {
		return br.readLine();
	} return br.readLine(); br.readLine() br.readLine br public static void main(String[] args) throws IOException {

		
			String line = next();
			if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No");

		
	} main {

		
			String line = next();
			if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No");

		
	} String line = next(); line next() next if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No"); line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5) line.charAt(2) == line.charAt(3) line.charAt(2) line.charAt line 2 line.charAt(3) line.charAt line 3 line.charAt(4) == line.charAt(5) line.charAt(4) line.charAt line 4 line.charAt(5) line.charAt line 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" String[] args args public class Main {

	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static int nextInt() throws IOException {
		return Integer.parseInt(br.readLine());
	}

	public static int[] nextArr() throws IOException {
		String elements[] = br.readLine().split(" ");
		int arr[] = new int[elements.length];
		for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]);
		return arr;
	}

	public static void printArr(int arr[]) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr);
	}

	public static String next() throws IOException {
		return br.readLine();
	}

	public static void main(String[] args) throws IOException {

		
			String line = next();
			if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No");

		
	}

} public class Main {

	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static int nextInt() throws IOException {
		return Integer.parseInt(br.readLine());
	}

	public static int[] nextArr() throws IOException {
		String elements[] = br.readLine().split(" ");
		int arr[] = new int[elements.length];
		for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]);
		return arr;
	}

	public static void printArr(int arr[]) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr);
	}

	public static String next() throws IOException {
		return br.readLine();
	}

	public static void main(String[] args) throws IOException {

		
			String line = next();
			if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No");

		
	}

} Main
import java.util.*;
import java.io.*;

public class Main {

	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static int nextInt() throws IOException {
		return Integer.parseInt(br.readLine());
	}

	public static int[] nextArr() throws IOException {
		String elements[] = br.readLine().split(" ");
		int arr[] = new int[elements.length];
		for (int j = 0; j < elements.length; j++)
			arr[j] = Integer.parseInt(elements[j]);
		return arr;
	}

	public static void printArr(int arr[]) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr);
	}

	public static String next() throws IOException {
		return br.readLine();
	}

	public static void main(String[] args) throws IOException {

		
			String line = next();
			if (line.charAt(2) == line.charAt(3) && line.charAt(4) == line.charAt(5))
				System.out.println("Yes");
			else
				System.out.println("No");

		
	}

}
