import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String mozi = scan.next();

		System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No");

		scan.close();

	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String mozi = scan.next();

		System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No");

		scan.close();

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String mozi = scan.next();

		System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No");

		scan.close();

	} main {

		Scanner scan = new Scanner(System.in);

		String mozi = scan.next();

		System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No");

		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String mozi = scan.next(); mozi scan.next() scan.next scan System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No") System.out.println System.out System System.out mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No" mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6)) mozi.substring(2,3).equals(mozi.substring(3,4)) mozi.substring(2,3).equals mozi.substring(2,3) mozi.substring mozi 2 3 mozi.substring(3,4) mozi.substring mozi 3 4 mozi.substring(4,5).equals(mozi.substring(5,6)) mozi.substring(4,5).equals mozi.substring(4,5) mozi.substring mozi 4 5 mozi.substring(5,6) mozi.substring mozi 5 6 "Yes" "No" scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String mozi = scan.next();

		System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No");

		scan.close();

	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String mozi = scan.next();

		System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No");

		scan.close();

	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String mozi = scan.next();

		System.out.println(mozi.substring(2,3).equals(mozi.substring(3,4)) && mozi.substring(4,5).equals(mozi.substring(5,6))?"Yes":"No");

		scan.close();

	}

}
