#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e6 + 3;
long long mypow(long long a, long long b) {
  long long ret = 1;
  a %= mod;
  while (b) {
    if (b & 1) {
      ret = ret * a % mod;
    }
    b >>= 1;
    a = a * a % mod;
  }
  return ret;
}
int main() {
  long long n, k;
  while (scanf("%I64d%I64d", &n, &k) != EOF) {
    if (n <= 60 && k > (1ll << n)) {
      puts("1 1");
      continue;
    }
    long long num = n;
    long long kk = k - 1;
    while (kk) {
      num += kk / 2;
      kk >>= 1;
    }
    long long N = mypow(2ll, n);
    long long tmp = 1;
    for (long long i = 1; i <= k; i++) {
      tmp = N * tmp % mod;
      if ((--N) == -1) break;
    }
    long long tm = mypow(2ll, num);
    long long inv = mypow(tm, mod - 2);
    long long fenzi = (mypow(mypow(2ll, n), k) - tmp + mod) % mod * inv % mod;
    long long fenmu = mypow(mypow(2ll, n), k) * inv % mod;
    printf("%I64d %I64d\n", fenzi, fenmu);
  }
  return 0;
}
