#include <bits/stdc++.h>
using namespace std;
const int mod = 1000003;
long long n, k;
long long qmod(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
int main() {
  while (~scanf("%I64d%I64d", &n, &k)) {
    if (n <= 60 && k > (1ll << n)) {
      printf("1 1");
      continue;
    }
    long long lrd = 0, A = 1ll, B = 1ll;
    for (long long i = 2; i <= (k - 1); i <<= 1ll) {
      lrd += (k - 1) / i;
    }
    long long x = qmod(2ll, n);
    long long gcd = qmod(2ll, lrd);
    for (long long i = 1; i <= k - 1; ++i) {
      A = A * (x - i) % mod;
      if (!A) break;
    }
    long long inv = qmod(gcd, mod - 2);
    A = A * inv % mod;
    B = qmod(x, k - 1);
    B = B * inv % mod;
    printf("%I64d %I64d\n", (B - A + mod) % mod, B);
  }
  return 0;
}
