import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

	    Result result = execute(sc.nextLine());
        System.out.println(result);
    }

    public static Result execute(String s){
        if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        }
        return Result.No;
    }

    public static enum Result{
        Yes,
        No;
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

	    Result result = execute(sc.nextLine());
        System.out.println(result);
    }

    public static Result execute(String s){
        if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        }
        return Result.No;
    }

    public static enum Result{
        Yes,
        No;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

	    Result result = execute(sc.nextLine());
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);

	    Result result = execute(sc.nextLine());
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Result result = execute(sc.nextLine()); result execute(sc.nextLine()) execute sc.nextLine() sc.nextLine sc System.out.println(result) System.out.println System.out System System.out result String[] args args public static Result execute(String s){
        if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        }
        return Result.No;
    } execute {
        if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        }
        return Result.No;
    } if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        } s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) s.charAt(2) == s.charAt(3) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 s.charAt(4) == s.charAt(5) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 {
            return Result.Yes;
        } return Result.Yes; Result.Yes Result Result.Yes return Result.No; Result.No Result Result.No String s s public static enum Result{
        Yes,
        No;
    } Result Yes Yes No No import java.util.Scanner;

public c import java.util.Scanner;

public class Main {

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

	    Result result = execute(sc.nextLine());
        System.out.println(result);
    }

    public static Result execute(String s){
        if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        }
        return Result.No;
    }

    public static enum Result{
        Yes,
        No;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

	    Result result = execute(sc.nextLine());
        System.out.println(result);
    }

    public static Result execute(String s){
        if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        }
        return Result.No;
    }

    public static enum Result{
        Yes,
        No;
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

	    Result result = execute(sc.nextLine());
        System.out.println(result);
    }

    public static Result execute(String s){
        if(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)){
            return Result.Yes;
        }
        return Result.No;
    }

    public static enum Result{
        Yes,
        No;
    }
}
