import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		}
	} main {
		Scanner sc = new Scanner(System.in);
		try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		} {
			sc.close();
		} sc.close() sc.close sc {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} String moji = sc.next(); moji sc.next() sc.next sc String answer = "No"; answer "No" if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			} moji.charAt(2) == (moji.charAt(3)) moji.charAt(2) moji.charAt moji 2 (moji.charAt(3)) moji.charAt moji 3 {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			} if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				} moji.charAt(4) == (moji.charAt(5)) moji.charAt(4) moji.charAt moji 4 (moji.charAt(5)) moji.charAt moji 5 {
					answer = "Yes";
				} answer = "Yes" answer "Yes" System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String moji = sc.next();
			String answer = "No";
			if (moji.charAt(2) == (moji.charAt(3))) {
				if (moji.charAt(4) == (moji.charAt(5))) {
					answer = "Yes";
				}

			}
			System.out.println(answer);

		} finally

		{
			sc.close();
		}
	}

}
