문제 풀이 방식이 잘못됐는지 아니면 코딩을 잘못 짰는지 제 머리론 한계네요 ㅠㅠ
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
double x_1 = input.nextDouble();
double y_1 = input.nextDouble();
double w_1 = input.nextDouble();
double h_1 = input.nextDouble();
double x_2 = input.nextDouble();
double y_2 = input.nextDouble();
double w_2 = input.nextDouble();
double h_2 = input.nextDouble();
double d_1 = Math.abs( x_1 - x_2 );
double d_2 = Math.abs( y_1 - y_2 );
if (d_1 > (w_1 + w_2) / 2 & d_2 > (h_1 + h_2) / 2)
System.out.println("outside");
else if (d_1 <= (w_1 - w_2 ) / 2 & d_2 <= (h_1 - h_2) / 2)
System.out.println("inside");
else
System.out.println("attach");
}
}