#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
double eps = 0.000001;
const int N = 2 * 100000 + 50;
const long long mod = 1e6 + 3;
long long powe_m(long long a, long long b) {
  long long ans = 1;
  long long tmp = a;
  while (b != 0) {
    if (b & 1) ans = ans * tmp % mod;
    tmp = tmp * tmp % mod;
    b = b >> 1;
  }
  return ans;
}
long long cal_gcd(long long k) {
  long long num = 0;
  for (long long kk = k - 1; kk; kk /= 2) num += kk / 2;
  return num;
}
int main() {
  long long n, k;
  cin >> n >> k;
  if (n <= 63) {
    long long tmp = 1LL << n;
    if (k > tmp) {
      printf("1 1\n");
      return 0;
    }
  }
  long long num = cal_gcd(k);
  long long fenzi = 1;
  long long two_n = powe_m(2, n);
  for (int i = 1; i < k; i++) {
    fenzi = fenzi * (two_n - i) % mod;
    if (two_n == i) break;
  }
  long long two_gcd = powe_m(2, num);
  fenzi = fenzi * powe_m(two_gcd, mod - 2) % mod;
  long long fenmu = powe_m(two_n, k - 1);
  fenmu = fenmu * powe_m(two_gcd, mod - 2) % mod;
  fenzi = fenmu - fenzi;
  if (fenzi < 0) fenzi = (fenzi % mod + mod) % mod;
  if (fenmu < 0) fenmu = (fenmu % mod + mod) % mod;
  printf("%I64d %I64d\n", fenzi, fenmu);
  return 0;
}
