#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  int draw = 0;
  int first_player = 0;
  int second_player = 0;
  for (int i = 1; i <= 6; i++) {
    if (abs(i - n) > abs(i - m))
      first_player++;
    else if (abs(i - n) < abs(i - m))
      second_player++;
    else
      draw++;
  }
  cout << second_player << " " << draw << " " << first_player << endl;
  return 0;
}
