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

public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] listStr = reader.readLine().split(" ");
    int[] list = new int[listStr.length];
    int[] copyList = new int[listStr.length];
    boolean flag = true;

    for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    }
    System.arraycopy(list, 0, copyList, 0, list.length);

    ascendingSort(list);

    for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    }

    System.out.println(flag ? "Yes" : "No");

  }

  public static void ascendingSort(int[] array) {
    for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    }
  }

  public static void descendingSort(int[] array) {
    for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    }
  }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] listStr = reader.readLine().split(" ");
    int[] list = new int[listStr.length];
    int[] copyList = new int[listStr.length];
    boolean flag = true;

    for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    }
    System.arraycopy(list, 0, copyList, 0, list.length);

    ascendingSort(list);

    for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    }

    System.out.println(flag ? "Yes" : "No");

  }

  public static void ascendingSort(int[] array) {
    for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    }
  }

  public static void descendingSort(int[] array) {
    for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    }
  }

} Main public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] listStr = reader.readLine().split(" ");
    int[] list = new int[listStr.length];
    int[] copyList = new int[listStr.length];
    boolean flag = true;

    for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    }
    System.arraycopy(list, 0, copyList, 0, list.length);

    ascendingSort(list);

    for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    }

    System.out.println(flag ? "Yes" : "No");

  } main {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] listStr = reader.readLine().split(" ");
    int[] list = new int[listStr.length];
    int[] copyList = new int[listStr.length];
    boolean flag = true;

    for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    }
    System.arraycopy(list, 0, copyList, 0, list.length);

    ascendingSort(list);

    for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    }

    System.out.println(flag ? "Yes" : "No");

  } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String[] listStr = reader.readLine().split(" "); listStr reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int[] list = new int[listStr.length]; list new int[listStr.length] listStr.length listStr listStr.length int[] copyList = new int[listStr.length]; copyList new int[listStr.length] listStr.length listStr listStr.length boolean flag = true; flag true for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    } int i = 0; int i = 0; i 0 i < listStr.length i listStr.length listStr listStr.length i++ i++ i {
      list[i] = Integer.parseInt(listStr[i]);
    } {
      list[i] = Integer.parseInt(listStr[i]);
    } list[i] = Integer.parseInt(listStr[i]) list[i] list i Integer.parseInt(listStr[i]) Integer.parseInt Integer listStr[i] listStr i System.arraycopy(list, 0, copyList, 0, list.length) System.arraycopy System list 0 copyList 0 list.length list list.length ascendingSort(list) ascendingSort list for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    } int i = 0; int i = 0; i 0 i < list.length i list.length list list.length i++ i++ i {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    } {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    } if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      } i < list.length - 2 && list[i] == copyList[i + 1] i < list.length - 2 i list.length - 2 list.length list list.length 2 list[i] == copyList[i + 1] list[i] list i copyList[i + 1] copyList i + 1 i 1 {
        flag = false;
        break;
      } flag = false flag false break; if (list[i] != copyList[i]) {
        flag = false;
        break;
      } list[i] != copyList[i] list[i] list i copyList[i] copyList i {
        flag = false;
        break;
      } flag = false flag false break; System.out.println(flag ? "Yes" : "No") System.out.println System.out System System.out flag ? "Yes" : "No" flag "Yes" "No" String[] args args public static void ascendingSort(int[] array) {
    for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    }
  } ascendingSort {
    for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    }
  } for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    } int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    } {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    } for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      } int j = 0; int j = 0; j 0 j < array.length - 1 - i j array.length - 1 - i array.length - 1 - i array.length array array.length 1 i j++ j++ j {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      } {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      } if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        } array[j] > array[j + 1] array[j] array j array[j + 1] array j + 1 j 1 {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        } int tmp = array[j]; tmp array[j] array j array[j] = array[j + 1] array[j] array j array[j + 1] array j + 1 j 1 array[j + 1] = tmp array[j + 1] array j + 1 j 1 tmp int[] array array public static void descendingSort(int[] array) {
    for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    }
  } descendingSort {
    for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    }
  } for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    } int i = array.length - 1; int i = array.length - 1; i array.length - 1 array.length array array.length 1 i >= 0 i 0 i-- i-- i {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    } {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    } for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      } int j = array.length - 1; int j = array.length - 1; j array.length - 1 array.length array array.length 1 j > array.length - 1 - i j array.length - 1 - i array.length - 1 - i array.length array array.length 1 i j-- j-- j {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      } {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      } if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        } array[j] > array[j - 1] array[j] array j array[j - 1] array j - 1 j 1 {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        } int tmp = array[j]; tmp array[j] array j array[j] = array[j - 1] array[j] array j array[j - 1] array j - 1 j 1 array[j - 1] = tmp array[j - 1] array j - 1 j 1 tmp int[] array array public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] listStr = reader.readLine().split(" ");
    int[] list = new int[listStr.length];
    int[] copyList = new int[listStr.length];
    boolean flag = true;

    for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    }
    System.arraycopy(list, 0, copyList, 0, list.length);

    ascendingSort(list);

    for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    }

    System.out.println(flag ? "Yes" : "No");

  }

  public static void ascendingSort(int[] array) {
    for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    }
  }

  public static void descendingSort(int[] array) {
    for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    }
  }

} public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] listStr = reader.readLine().split(" ");
    int[] list = new int[listStr.length];
    int[] copyList = new int[listStr.length];
    boolean flag = true;

    for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    }
    System.arraycopy(list, 0, copyList, 0, list.length);

    ascendingSort(list);

    for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    }

    System.out.println(flag ? "Yes" : "No");

  }

  public static void ascendingSort(int[] array) {
    for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    }
  }

  public static void descendingSort(int[] array) {
    for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    }
  }

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

public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] listStr = reader.readLine().split(" ");
    int[] list = new int[listStr.length];
    int[] copyList = new int[listStr.length];
    boolean flag = true;

    for (int i = 0; i < listStr.length; i++) {
      list[i] = Integer.parseInt(listStr[i]);
    }
    System.arraycopy(list, 0, copyList, 0, list.length);

    ascendingSort(list);

    for (int i = 0; i < list.length; i++) {
      if (i < list.length - 2 && list[i] == copyList[i + 1]) {
        flag = false;
        break;
      }
      if (list[i] != copyList[i]) {
        flag = false;
        break;
      }
    }

    System.out.println(flag ? "Yes" : "No");

  }

  public static void ascendingSort(int[] array) {
    for (int i = 0; i < array.length; i++) {
      for (int j = 0; j < array.length - 1 - i; j++) {
        if (array[j] > array[j + 1]) {
          int tmp = array[j];
          array[j] = array[j + 1];
          array[j + 1] = tmp;
        }
      }
    }
  }

  public static void descendingSort(int[] array) {
    for (int i = array.length - 1; i >= 0; i--) {
      for (int j = array.length - 1; j > array.length - 1 - i; j--) {
        if (array[j] > array[j - 1]) {
          int tmp = array[j];
          array[j] = array[j - 1];
          array[j - 1] = tmp;
        }
      }
    }
  }

}