#include<stdio.h> int main() { int m, n; scanf_s("%d %d", &n, &m); printf("%d %d", (4 * n - m) / 2, (m - 2 * n) / 2); return 0; }