import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int[] a = new int[3]; int[] d = new int[3]; for (int i = 0; i < 3; i++) { a[i] = sc.nextInt(); } for (int i = 0; i < 3; i++) { d[i] = sc.nextInt(); } sc.close(); Arrays.sort(a); Arrays.sort(d); for (int i = 0; i < 3; i++) { if (a[i] != d[i]) { System.out.println("No"); return; } } System.out.println("Yes"); } }