#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, first = 0, second = 0, draw = 0, arr[6] = {1, 2, 3, 4, 5, 6};
  cin >> a >> b;
  for (int i = 0; i < 6; i++) {
    if (abs(arr[i] - a) < abs(arr[i] - b))
      first++;
    else if (abs(arr[i] - a) > abs(arr[i] - b))
      second++;
    else
      draw++;
  }
  cout << first << " " << draw << " " << second << endl;
  return 0;
}
