import java.util.Scanner;

public class Test10 {
	public static void main(String[] args) {
		Scanner scanf = new Scanner(System.in);
		int a, b, n;
		int sum = 0, cnt = 0, avg = 0;
		a = scanf.nextInt();
		b = scanf.nextInt();
		if (a > b)
			for (n = b; n <= a; n++)
			{
				sum += n;
				cnt++;
			}
		else
			for (n = a; n <= b; n++)
			{
				sum += n;
				cnt++;
			}
		avg = sum / cnt;
		System.out.printf("%d %d", sum, avg);
		scanf.close();
	}
}
