Код:
using System;namespace ThisAnswerIsNotMine { class Program { private static int a; private static int b; private static int c; private static int d; private static void Main() { int.TryParse(Console.ReadLine()!, out a); int.TryParse(Console.ReadLine()!, out b); int.TryParse(Console.ReadLine()!, out c); int.TryParse(Console.ReadLine()!, out d); Console.WriteLine((a / c) * (b / d) >= (b / c) * (a / d) ? "Широкая" : "Узкая"); } }}
import java.util.Scanner;
class Main {
static int getNumb() {
Scanner sxy = new Scanner(System.in);
return sxy.nextInt();
}
public static void main(String [ ] args) {
int x1 = getNumb();
int y1 = getNumb();
int x2 = getNumb();
int y2 = getNumb();
String can = "NO";
if((x1 + 1 == x2) || (x1 - 1 == x2) && y1 == y2) {
can = "YES";
}
else if((y1 + 1 == y2) || (y1 - 1 == y2) && x1 == x2) {
can = "YES";
}
else if((x1 + 1 == x2 && y1 + 1 == y2) || (x1 + 1 == x2 && y1 - 1 == y2) || (x1 - 1 == x2 && y1 + 1 == y2) || (x1 - 1 == x2 && y1 - 1 == y2)) {
can = "YES";
}
System.out.print(can);
}
}