import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    }
} import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws FileNotFoundException {

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    }
} Main public static void main(String[] args) throws FileNotFoundException {

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    } main {

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[] A = S.toCharArray(); A S.toCharArray() S.toCharArray S if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	} A[2]==A[3]&&A[4]==A[5] A[2]==A[3] A[2] A 2 A[3] A 3 A[4]==A[5] A[4] A 4 A[5] A 5 {
    		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) throws FileNotFoundException {

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    }
} public class Main {
    public static void main(String[] args) throws FileNotFoundException {

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    }
} Main
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {

//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);

    	Scanner sc = new Scanner(System.in);

    	String S = sc.next();

    	char[] A = S.toCharArray();

    	if(A[2]==A[3]&&A[4]==A[5]) {
    		System.out.println("Yes");
    	} else {
    		System.out.println("No");
    	}
    }
}
