public class PizzaParty {
    public static void main(String[] args) {
        int slices = Integer.parseInt(args[0]);
        int friends = Integer.parseInt(args[1]);
        int slicesEach = slices / friends;
        int leftover = slices % friends;
        System.out.println("Each friend gets " + slicesEach + " slices.");
        System.out.println(leftover + " slices left over.");
    }
}
