#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <cctype>

#include <algorithm>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

#define max_len 100000 // do not change this constant (it's taken from statements)
#define maxs (max_len + 1) * 3

struct num
{
  int a[maxs];
};

void Out( num &a )
{
  int i = maxs - 1;
  while (i && !a.a[i])
    i--;
  while (i >= 0)
    fprintf(stderr, "%d", a.a[i--]);
  fprintf(stderr, "\n");
}

void Read( num &p )
{
  int n = 0, c = getc(stdin);

  assert(isdigit(c) && c != '0');
  memset(p.a, 0, sizeof(p.a));
  while (isdigit(c))
  {
    assert(n <= max_len);
    p.a[n++] = c - '0', c = getc(stdin);
  }
  reverse(p.a, p.a + n);
  if (n > max_len)
    forn(i, max_len)
      assert(p.a[i] == 0);
  assert(c == 10 || c == 13);
}

int Zeroes( num &a )
{
  int i = 0;
  while (i < maxs && a.a[i] == 0)
    i++;
  return i == maxs ? 0 : i;
}

int Cmp( num &a, num &b )
{
  for (int i = maxs - 1; i >= 0; i--)
    if (a.a[i] != b.a[i])
      return a.a[i] - b.a[i];
  return 0;
}

void Add( num &a, num &b )
{
  forn(i, maxs)
    a.a[i] += b.a[i];
  forn(i, maxs)
    if (a.a[i] >= 10)
      a.a[i] -= 10, a.a[i + 1]++;
}

void Sub( num &a, num &b )
{
  forn(i, maxs)
    a.a[i] -= b.a[i];
  forn(i, maxs)
    if (a.a[i] < 0)
      a.a[i] += 10, a.a[i + 1]--;
}

void Shift( num &a, int n )
{
  for (int i = maxs - 1; i >= n; i--)
    a.a[i] = a.a[i - n];
  forn(i, n)
    a.a[i] = 0;
}

num a[3], x, y;
int za, zb, zm, ans[3];

void Shift( num &a, num &b )
{
  za = Zeroes(a), zb = Zeroes(b);
  zm = min(za, zb);
  za -= zm, zb -= zm;
  swap(za, zb);
  Shift(a, za), Shift(b, zb);
}

int Solve( num &a, num &b )
{
  Shift(a, b);
  return Cmp(a, b) == 0;
}

void Out()
{
  //puts("YES");
  forn(i, 3)
    printf("%d ", ans[i]);
  exit(0);
}

int main()
{
  //freopen("sum.in", "r", stdin);
  //freopen("sum.out", "w", stdout);

  memset(ans, 0, sizeof(ans));
  forn(i, 3)
    Read(a[i]);

  x = a[0], y = a[1];
  Shift(x, y);
  Add(x, y);
  y = a[2];
  if (Solve(x, y))
  {
    ans[0] += za, ans[1] += za;
    ans[2] += zb;
    x = a[0], y = a[1];
    Shift(x, y);
    ans[0] += za, ans[1] += zb;
    Out();
  }

  forn(t, 2)
  {
    x = a[t], y = a[2];
    Shift(x, y);
    if (Cmp(y, x) >= 0)
    {
      Sub(y, x);
      x = a[t ^ 1];
      if (Solve(x, y))
      {
        ans[t] += zb, ans[2] += zb;
        ans[t ^ 1] += za;
        x = a[t], y = a[2];
        Shift(x, y);
        ans[t] += za, ans[2] += zb;
        Out();
      }
    }
  }

  puts("NOT EXISTS");
  return 0;
}
