import java.util.Scanner; public class class123 { public static void main (String[] args) { Scanner sc = new Scanner (System.in); System.out.println("enter number"); int firstnumber = sc.nextInt(); System.out.println("enter number"); int secondnumber = sc.nextInt(); int x = 1; int y=1; int count1 = 0; int count2 = 0; while (x<=firstnumber) { if ( x%firstnumber ==0){ count1 = count1 + x; } x++; } while (y<=secondnumber) { if ( y%secondnumber ==0){ count2 = count2 + y; } y++; } if (count2==secondnumber){ System.out.println("amicable numbers"); } else {System.out.println("not amicable number");} } }