#include <bits/stdc++.h>
using namespace std;
const int M = 1000003;
inline int modpow(int a, const long long &n) {
  int res = 1;
  for (long long i = n; i; i >>= 1) {
    if (i & 1) res = (long long)res * a % M;
    a = (long long)a * a % M;
  }
  return res;
}
long long n, m;
inline int get_prod(int d, int k) {
  int res = 1;
  for (int i = 0; i < k; ++i) res = (long long)res * (d + M - i) % M;
  return res;
}
inline long long get_expo(long long n) {
  long long res = 0;
  while (n > 0) res += (n >>= 1);
  return res;
}
inline void solve() {
  if (n <= 60 && ((1ll << n) < m)) {
    puts("1 1");
    return;
  }
  int total = modpow(2, n);
  int num = m >= M ? 0 : get_prod(total, m);
  int den = modpow(total, m);
  long long expo = get_expo(m - 1) + n;
  int inv = modpow(modpow(2, expo), M - 2);
  num = (long long)num * inv % M;
  den = (long long)den * inv % M;
  num = (den + M - num) % M;
  printf("%d %d\n", num, den);
}
int main() {
  cin >> n >> m;
  solve();
  return 0;
}
