#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long sum = 0, t = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') t = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    sum = sum * 10 + ch - '0';
    ch = getchar();
  }
  return sum * t;
}
long long n, k;
long long U = 1, D = 1;
long long quick_mod(long long x, long long y) {
  x %= 1000003;
  long long res = 1;
  for (; y; y >>= 1, (x *= x) %= 1000003)
    if (y & 1) (res *= x) %= 1000003;
  return res;
}
int main() {
  n = read(), k = read();
  if (n < 62 && (1LL << n) < k) {
    printf("1 1\n");
    return 0;
  }
  long long num = 0;
  for (long long i = 2; i < k; i <<= 1) (num += (k - 1) / i) %= (1000003 - 1);
  long long tot = quick_mod(2, n % (1000003 - 1));
  for (int i = 1; i < k && i <= 1000003; i++)
    (U *= (1000003 + (tot - i)) % 1000003) %= 1000003;
  long long D_d =
      ((n % (1000003 - 1)) * ((k - 1) % (1000003 - 1)) % (1000003 - 1) +
       1000003 - 1 - num) %
      (1000003 - 1);
  D = quick_mod(2, D_d);
  U = U * quick_mod(quick_mod(2, 1000003 - 2), num) % 1000003;
  U = (D - U) % 1000003;
  if (U < 0) U += 1000003;
  printf("%lld %lld\n", U, D);
  return 0;
}
