#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000003ll;
long long fpow(long long a, long long k) {
  if (!k) return 1ll;
  long long res = fpow(a, k >> 1);
  res = (res * res) % mod;
  if (k & 1ll) res = (res * a) % mod;
  return res;
}
long long inv(long long a) { return fpow(a, mod - 2ll); }
long long n, k;
int main() {
  cin >> n >> k;
  if (n <= 60 && (1ll << int(n)) < k) {
    printf("1 1\n");
    return 0;
  }
  long long two_n = fpow(2ll, n);
  long long two_nk = fpow(two_n, k);
  long long two_m = 1ll;
  int l = 1;
  while ((1ll << l) <= k) {
    long long x = k / (1ll << l);
    if (k % (1ll << l)) x++;
    two_m = (two_m * fpow(2ll, x)) % mod;
    l++;
  }
  if (n >= l) two_m = (two_m * fpow(2ll, n - l + 1ll)) % mod;
  long long num, den;
  if (k >= mod)
    num = 0ll;
  else {
    num = 1ll;
    for (long long i = 0ll; i < k; i++) {
      num = (num * ((two_n - i + mod) % mod)) % mod;
    }
    num = (num * inv(two_m)) % mod;
  }
  den = (two_nk * inv(two_m)) % mod;
  printf("%lld %lld\n", (den - num + mod) % mod, den);
  return 0;
}
