import java.io.*;

public class Main {
  
  static String s;

  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    s = br.readLine();

    br.close();

    boolean ok = true;
    if(s.charAt(2) != s.charAt(3)) ok = false;
    if(s.charAt(4) != s.charAt(5)) ok = false;
    System.out.println(ok ? "Yes" : "No");
  }
} import java.io.*; io.* java public class Main {
  
  static String s;

  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    s = br.readLine();

    br.close();

    boolean ok = true;
    if(s.charAt(2) != s.charAt(3)) ok = false;
    if(s.charAt(4) != s.charAt(5)) ok = false;
    System.out.println(ok ? "Yes" : "No");
  }
} Main static String s; s public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    s = br.readLine();

    br.close();

    boolean ok = true;
    if(s.charAt(2) != s.charAt(3)) ok = false;
    if(s.charAt(4) != s.charAt(5)) ok = false;
    System.out.println(ok ? "Yes" : "No");
  } main {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    s = br.readLine();

    br.close();

    boolean ok = true;
    if(s.charAt(2) != s.charAt(3)) ok = false;
    if(s.charAt(4) != s.charAt(5)) ok = false;
    System.out.println(ok ? "Yes" : "No");
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) s = br.readLine() s br.readLine() br.readLine br br.close() br.close br boolean ok = true; ok true if(s.charAt(2) != s.charAt(3)) ok = false; s.charAt(2) != s.charAt(3) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 ok = false ok false if(s.charAt(4) != s.charAt(5)) ok = false; s.charAt(4) != s.charAt(5) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 ok = false ok false System.out.println(ok ? "Yes" : "No") System.out.println System.out System System.out ok ? "Yes" : "No" ok "Yes" "No" String[] args args public class Main {
  
  static String s;

  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    s = br.readLine();

    br.close();

    boolean ok = true;
    if(s.charAt(2) != s.charAt(3)) ok = false;
    if(s.charAt(4) != s.charAt(5)) ok = false;
    System.out.println(ok ? "Yes" : "No");
  }
} public class Main {
  
  static String s;

  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    s = br.readLine();

    br.close();

    boolean ok = true;
    if(s.charAt(2) != s.charAt(3)) ok = false;
    if(s.charAt(4) != s.charAt(5)) ok = false;
    System.out.println(ok ? "Yes" : "No");
  }
} Main
import java.io.*;

public class Main {
  
  static String s;

  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    s = br.readLine();

    br.close();

    boolean ok = true;
    if(s.charAt(2) != s.charAt(3)) ok = false;
    if(s.charAt(4) != s.charAt(5)) ok = false;
    System.out.println(ok ? "Yes" : "No");
  }
}