import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(problem160a(s));
    }

    private static String problem160a(String s) {
        return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No";
    }

    private static boolean equal(String s, int at1, int at2) {
        return s.charAt(at1) == s.charAt(at2);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(problem160a(s));
    }

    private static String problem160a(String s) {
        return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No";
    }

    private static boolean equal(String s, int at1, int at2) {
        return s.charAt(at1) == s.charAt(at2);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(problem160a(s));
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(problem160a(s));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc System.out.println(problem160a(s)) System.out.println System.out System System.out problem160a(s) problem160a s String[] args args private static String problem160a(String s) {
        return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No";
    } problem160a {
        return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No";
    } return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No"; (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No" (equal(s, 2, 3) && equal(s, 4, 5)) equal(s, 2, 3) equal s 2 3 equal(s, 4, 5) equal s 4 5 "Yes" "No" String s s private static boolean equal(String s, int at1, int at2) {
        return s.charAt(at1) == s.charAt(at2);
    } equal {
        return s.charAt(at1) == s.charAt(at2);
    } return s.charAt(at1) == s.charAt(at2); s.charAt(at1) == s.charAt(at2) s.charAt(at1) s.charAt s at1 s.charAt(at2) s.charAt s at2 String s s int at1 at1 int at2 at2 public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(problem160a(s));
    }

    private static String problem160a(String s) {
        return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No";
    }

    private static boolean equal(String s, int at1, int at2) {
        return s.charAt(at1) == s.charAt(at2);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(problem160a(s));
    }

    private static String problem160a(String s) {
        return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No";
    }

    private static boolean equal(String s, int at1, int at2) {
        return s.charAt(at1) == s.charAt(at2);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(problem160a(s));
    }

    private static String problem160a(String s) {
        return (equal(s, 2, 3) && equal(s, 4, 5)) ? "Yes" : "No";
    }

    private static boolean equal(String s, int at1, int at2) {
        return s.charAt(at1) == s.charAt(at2);
    }
}