Soon after the Chunga-Changa island was discovered, it started to acquire some forms of civilization and even market economy. A new currency arose, colloquially called "chizhik". One has to pay in chizhiks to buy a coconut now.

Sasha and Masha are about to buy some coconuts which are sold at price z chizhiks per coconut. Sasha has x chizhiks, Masha has y chizhiks. Each girl will buy as many coconuts as she can using only her money. This way each girl will buy an integer non-negative number of coconuts.

The girls discussed their plans and found that the total number of coconuts they buy can increase (or decrease) if one of them gives several chizhiks to the other girl. The chizhiks can't be split in parts, so the girls can only exchange with integer number of chizhiks.

Consider the following example. Suppose Sasha has 5 chizhiks, Masha has 4 chizhiks, and the price for one coconut be 3 chizhiks. If the girls don't exchange with chizhiks, they will buy 1 + 1 = 2 coconuts. However, if, for example, Masha gives Sasha one chizhik, then Sasha will have 6 chizhiks, Masha will have 3 chizhiks, and the girls will buy 2 + 1 = 3 coconuts. 

It is not that easy to live on the island now, so Sasha and Mash want to exchange with chizhiks in such a way that they will buy the maximum possible number of coconuts. Nobody wants to have a debt, so among all possible ways to buy the maximum possible number of coconuts find such a way that minimizes the number of chizhiks one girl gives to the other (it is not important who will be the person giving the chizhiks).

Input

The first line contains three integers x, y and z (0 ≤ x, y ≤ 10^{18}, 1 ≤ z ≤ 10^{18}) — the number of chizhics Sasha has, the number of chizhics Masha has and the price of a coconut. 

Output

Print two integers: the maximum possible number of coconuts the girls can buy and the minimum number of chizhiks one girl has to give to the other.

Examples

Input


5 4 3


Output


3 1


Input


6 8 2


Output


7 0

Note

The first example is described in the statement. In the second example the optimal solution is to dot exchange any chizhiks. The girls will buy 3 + 4 = 7 coconuts.
#include <bits/stdc++.h>
using namespace std;
long long min(long long x, long long y) {
  if (x > y) return y;
  return x;
}
long long max(long long x, long long y) {
  if (x > y) return x;
  return y;
}
long long gcd(long long x, long long y) {
  if (!x) return y;
  return gcd(y % x, x);
}
void swap(long long &x, long long &y) {
  long long temp;
  temp = x;
  x = y;
  y = temp;
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
long long modexp(long long x, long long n, long long mod) {
  if (x == 0) return 0;
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result % mod * x % mod) % mod;
    x = (x % mod * x % mod) % mod;
    n = n / 2;
  }
  return (result % mod + mod) % mod;
}
long long d, x, y;
void extendedEuclid(long long A, long long B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(B, A % B);
    long long temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long modinverse(long long A, long long mod) {
  extendedEuclid(A, mod);
  return (x % mod + mod) % mod;
}
vector<long long> factorize(long long n) {
  vector<long long> res;
  for (long long i = 2; (i % 1000000007 * i % 1000000007) % 1000000007 <= n;
       i++) {
    while (n % i == 0) {
      res.push_back(i);
      n /= i;
    }
  }
  if (n != 1) res.push_back(n);
  return res;
}
vector<long long> answer;
void simpleSieve(long long limit, vector<long long> &prime) {
  vector<bool> mark(limit + 1, 1);
  for (long long p = 2; p * p <= limit; p++) {
    if (mark[p] == true) {
      for (long long i = p * 2; i <= limit; i += p) mark[i] = false;
    }
  }
  for (long long p = 2; p <= limit; p++) {
    if (mark[p] == true) {
      prime.push_back(p);
    }
  }
}
vector<long long> segmentedSieve(long long n) {
  long long limit = floor(sqrt(n)) + 1;
  vector<long long> prime;
  simpleSieve(limit, prime);
  long long low = limit;
  long long high = 2 * limit;
  answer = prime;
  while (low < n) {
    if (high >= n) high = n;
    vector<bool> mark(limit, 1);
    for (long long i = 0; i < prime.size(); i++) {
      long long loLim = floor(low / prime[i]) * prime[i];
      if (loLim < low) loLim += prime[i];
      for (long long j = loLim; j <= high; j += prime[i]) mark[j - low] = false;
    }
    for (long long i = low; i <= high; i++)
      if (mark[i - low] == true) {
        answer.push_back(i);
      }
    low = low + limit;
    high = high + limit;
  }
  return answer;
}
vector<long long> primesInRange(long long low, long long high) {
  long long limit = floor(sqrt(high)) + 1;
  vector<long long> prime;
  simpleSieve(limit, prime);
  long long n = high - low + 1;
  vector<bool> mark(n, 1);
  for (int i = 0; i < prime.size(); i++) {
    int loLim = floor(low / prime[i]) * prime[i];
    if (loLim < low) loLim += prime[i];
    if (loLim == prime[i]) loLim += prime[i];
    for (int j = loLim; j <= high; j += prime[i]) mark[j - low] = false;
  }
  for (int i = low; i <= high; i++)
    if (mark[i - low]) answer.push_back(i);
  return answer;
}
long long check(long long x) {}
long long binsearch(long long lo, long long hi) {
  while (lo < hi) {
    long long mid = lo + (hi - lo + 1) / 2;
    if (check(mid))
      lo = mid;
    else
      hi = mid - 1;
  }
  return lo;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long x, y, z;
  cin >> x >> y >> z;
  long long cnt = (x + y) / z;
  long long temp = x / z + y / z;
  if (cnt == temp) {
    cout << cnt << " " << 0;
    return 0;
  } else {
    long long rem1 = z - (x % z);
    long long rem2 = z - (y % z);
    long long ans = min(rem1, rem2);
    cout << cnt << " " << ans;
  }
  return 0;
}
