import java.beans.XMLEncoder; import java.util.Scanner; public class Osigurovki { public static void main(String[] args) { Scanner in = new Scanner(System.in); int age = in.nextInt(); double money = in.nextDouble(); double moneyP; // osigurovki potrebitel double moneyR; // osigurovki rabotodatel if (age ==0) { System.out.println("bebetata ne rabotqt"); } if (money<3000) { if(age<=55) { moneyP = money*0.20; moneyR = money*0.17; } else if (age>55 && age<=60) { moneyP = money*0.13; moneyR = moneyP; } else if (age>60 && age<=65) { moneyP = money*0.075; moneyR = money*0.9; } else { moneyP = money*0.5; moneyR = money*0.075; } } else { double newMoney = money - 3000; // ostanali parichki moneyP = 3000*0.20; moneyR = moneyP; } System.out.println(moneyP + " " + moneyR); } }