fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b;
  6. cin >> a >> b;
  7. cout << max(0, (b - a))<< " "<< max(b, (b - a));
  8. return 0;
  9. }
Success #stdin #stdout 0.01s 5320KB
stdin
7 9

stdout
2 9