#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int a, b;
  cin >> a >> b;
  long long int x = 0, y = 0, z = 0;
  for (long long int i = 1; i <= 6; i++) {
    if (abs(i - a) < abs(i - b))
      x++;
    else if (abs(i - a) > abs(i - b))
      y++;
    else
      z++;
  }
  cout << x << " " << z << " " << y;
  return 0;
}
