import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Stream; public class Main { public static void main(String[] args) throws Exception { InputStreamReader is = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(is); List mylist = new ArrayList<>(); // 標準入力からの値を変数strinputに代入 String strinput = reader.readLine(); while (strinput != null) { mylist.add(strinput); strinput = reader.readLine(); } String arr[] = mylist.get(0).split(" "); Stream stream = Arrays.stream(arr); int arr02[] = stream.mapToInt(Integer::parseInt).toArray(); int l = arr.length; Arrays.sort(arr02); Boolean chkflg = true; for (int i = 0; i < l - 1; i++) { int a = Integer.valueOf(arr02[i]); int b = Integer.valueOf(arr02[i + 1]); if (b - a != 1) { chkflg = false; break; } } System.out.println(chkflg ? "Yes" : "No"); } }