#include <bits/stdc++.h>
using namespace std;
int a, b;
int first = 0, draw = 0, second = 0;
int main() {
  cin >> a >> b;
  for (int i = 1; i <= 6; i++) {
    if (max(a, i) - min(a, i) < max(b, i) - min(b, i))
      first++;
    else if (max(a, i) - min(a, i) == max(b, i) - min(b, i))
      draw++;
    else
      second++;
  }
  cout << first << " " << draw << " " << second << "\n";
  return 0;
}
