#include <bits/stdc++.h>
using namespace std;
int mult(int x, int y) {
  long long int ans, x1 = (long long int)x, y1 = (long long int)y;
  ans = (x1 * y1) % 1000003;
  return (int)ans;
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
long long int pow1(long long int a, long long int b) {
  long long int ans = 1;
  while (b > 0) {
    if (b & 1) ans = (ans * a) % 1000003;
    a = (a * a) % 1000003;
    b >>= 1;
  }
  return ans;
}
int mina(int arr[], int n) {
  int x = arr[0], i, pos = 0;
  for (i = 1; i < n; i++) {
    if (arr[i] < x) {
      x = arr[i];
      pos = i;
    }
  }
  return x;
}
int maxa(int arr[], int n) {
  int x = arr[0], i, pos = 0;
  for (i = 1; i < n; i++) {
    if (arr[i] > x) {
      x = arr[i];
      pos = i;
    }
  }
  return x;
}
int main() {
  long long int n, k, i, j;
  scanf("%lld", &n);
  scanf("%lld", &k);
  if (n <= 63) {
    long long int x1 = 1;
    for (i = 1; i < n + 1; i++) x1 *= 2;
    if (k > x1) {
      cout << "1 1" << endl;
      return 0;
    }
  }
  long long int tmp1 = 2, tmp = k - 1, high2 = 0;
  while (tmp1 <= tmp) {
    high2 += (tmp / tmp1);
    tmp1 *= 2;
  }
  long long int den = pow1(2, k - 1);
  den = pow1(den, n);
  tmp1 = pow1(2, high2);
  tmp1 = pow1(tmp1, 1000003 - 2);
  den = (den * tmp1) % 1000003;
  long long int num = 1;
  if (k - 1 > 1000003)
    num = 0;
  else {
    for (i = 1; i < k; i++) {
      long long int x1 = pow1(2, n);
      x1 -= i;
      if (x1 < 0) x1 += 1000003;
      num = (num * x1) % 1000003;
    }
    num = (num * tmp1) % 1000003;
  }
  num = den - num;
  if (num < 0) num += 1000003;
  cout << num << " " << den << endl;
  return 0;
}
