#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, m = 0, x = 0, y = 0, a = 0, b = 0, c = 0;
  cin >> n >> m;
  for (int i = 1; i < 7; i++) {
    x = abs(i - n);
    y = abs(i - m);
    if (x == y) {
      b++;
    }
    if (x < y) {
      a++;
    }
    if (x > y) {
      c++;
    }
  }
  cout << a << ' ' << b << ' ' << c;
}
