#include <bits/stdc++.h>
using namespace std;
const long long p = 1000003;
long long n, k, m, chu, sum, ans, ans1, t;
long long ksm(long long x, long long y) {
  if (y == 0) return 1;
  long long t = ksm(x, y / 2);
  if (y % 2 == 0) return t * t % p;
  return t * t % p * x % p;
}
int main() {
  scanf("%I64d%I64d", &n, &k);
  if (n <= 63) {
    sum = (long long)1 << n;
    if (k > sum) {
      printf("1 1\n");
      return 0;
    }
  }
  m = k - 1;
  chu = 1;
  sum = 0;
  while (chu <= m) {
    chu *= 2;
    sum += m / chu;
  }
  sum += n;
  ans = ksm(2, n);
  ans = ksm(ans, k);
  ans = (ans * ksm(ksm(2, sum), p - 2)) % p;
  if (k >= p)
    printf("%I64d %I64d\n", ans, ans);
  else {
    t = ksm(2, n);
    ans1 = 1;
    for (int i = 0; i <= k - 1; i++) ans1 = (ans1 * ((t + p - i) % p)) % p;
    ans1 = (ans1 * ksm(ksm(2, sum), p - 2)) % p;
    printf("%I64d %I64d\n", (ans - ans1 + p) % p, ans);
  }
  return 0;
}
