import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String moji = sc.nextLine();
        boolean flag = false;

        String[] mojiretu = new String[moji.length()];

        for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        }

        if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        }

        if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String moji = sc.nextLine();
        boolean flag = false;

        String[] mojiretu = new String[moji.length()];

        for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        }

        if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        }

        if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String moji = sc.nextLine();
        boolean flag = false;

        String[] mojiretu = new String[moji.length()];

        for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        }

        if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        }

        if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String moji = sc.nextLine();
        boolean flag = false;

        String[] mojiretu = new String[moji.length()];

        for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        }

        if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        }

        if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String moji = sc.nextLine(); moji sc.nextLine() sc.nextLine sc boolean flag = false; flag false String[] mojiretu = new String[moji.length()]; mojiretu new String[moji.length()] moji.length() moji.length moji for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        } int i = 0; int i = 0; i 0 i<moji.length() i moji.length() moji.length moji i++ i++ i {
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        } {
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        } String moji2 = String.valueOf(moji.charAt(i)); moji2 String.valueOf(moji.charAt(i)) String.valueOf String moji.charAt(i) moji.charAt moji i mojiretu[i] = moji2 mojiretu[i] mojiretu i moji2 if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        } mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5]) mojiretu[2].equals(mojiretu[3]) mojiretu[2].equals mojiretu[2] mojiretu 2 mojiretu[3] mojiretu 3 mojiretu[4].equals(mojiretu[5]) mojiretu[4].equals mojiretu[4] mojiretu 4 mojiretu[5] mojiretu 5 {
            flag = true;
        } flag = true flag true if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        } flag == true flag true {
        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){
        Scanner sc = new Scanner(System.in);
        String moji = sc.nextLine();
        boolean flag = false;

        String[] mojiretu = new String[moji.length()];

        for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        }

        if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        }

        if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String moji = sc.nextLine();
        boolean flag = false;

        String[] mojiretu = new String[moji.length()];

        for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        }

        if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        }

        if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String moji = sc.nextLine();
        boolean flag = false;

        String[] mojiretu = new String[moji.length()];

        for(int i = 0; i<moji.length();i++){
            String moji2 = String.valueOf(moji.charAt(i));
            mojiretu[i] = moji2;
        }

        if(mojiretu[2].equals(mojiretu[3]) && mojiretu[4].equals(mojiretu[5])){
            flag = true;
        }

        if(flag == true){
        System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}