#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000003;
long long power(long long b, long long p) {
  long long r = 1;
  while (p > 0) {
    if (p & 1) {
      r = r * b % MOD;
    }
    b = b * b % MOD;
    p >>= 1;
  }
  return r;
}
long long Legendre(long long n, long long p) {
  long long r = 0;
  long long b = p;
  while (b <= n) {
    r += n / b;
    b *= p;
  }
  return r;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  if (n < 60 && k > (1LL << n)) {
    return cout << 1 << " " << 1 << "\n", 0;
  }
  long long gcd = power(power(2, Legendre(k - 1, 2)), MOD - 2);
  long long two = power(2, n);
  long long numerator = 1;
  for (long long i = 1; i < k && numerator > 0; ++i) {
    numerator = numerator * (two + MOD - i) % MOD;
  }
  long long denominator = power(two, k - 1);
  numerator = numerator * gcd % MOD;
  denominator = denominator * gcd % MOD;
  numerator = ((denominator - numerator) % MOD + MOD) % MOD;
  cout << numerator << " " << denominator << "\n";
  return 0;
}
