public class Main {
    public static void main(String[] args) {
        int wealthy = 0, stranger = 0;
        for (int i = 0; i < 30; i++) {
            wealthy += 10;
            stranger += (int) Math.pow(2, i);
        }
        System.out.println(wealthy + " " + stranger);
    }
}