import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String str = in.readLine(); str in.readLine() in.readLine in System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No") System.out.println System.out System System.out str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No" str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6)) str.substring(2,3).equals(str.substring(3,4)) str.substring(2,3).equals str.substring(2,3) str.substring str 2 3 str.substring(3,4) str.substring str 3 4 str.substring(4,5).equals(str.substring(5,6)) str.substring(4,5).equals str.substring(4,5) str.substring str 4 5 str.substring(5,6) str.substring str 5 6 "Yes" "No" String[] args args public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No");
  }
} public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    System.out.println(str.substring(2,3).equals(str.substring(3,4))
                       && str.substring(4,5).equals(str.substring(5,6))?"Yes":"No");
  }
}