Problem:


Score : 100 points

Problem Statement

We conducted a survey on newspaper subscriptions.
More specifically, we asked each of the N respondents the following two questions:

Question 1: Are you subscribing to Newspaper X?

Question 2: Are you subscribing to Newspaper Y?

As the result, A respondents answered "yes" to Question 1, and B respondents answered "yes" to Question 2.

What are the maximum possible number and the minimum possible number of respondents subscribing to both newspapers X and Y?

Write a program to answer this question.

Constraints

1 \leq N \leq 100

0 \leq A \leq N

0 \leq B \leq N

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N A B

Output

Print the maximum possible number and the minimum possible number of respondents subscribing to both newspapers, in this order, with a space in between.

Sample Input 1

10 3 5

Sample Output 1

3 0

In this sample, out of the 10 respondents, 3 answered they are subscribing to Newspaper X, and 5 answered they are subscribing to Newspaper Y.

Here, the number of respondents subscribing to both newspapers is at most 3 and at least 0.

Sample Input 2

10 7 5

Sample Output 2

5 2

In this sample, out of the 10 respondents, 7 answered they are subscribing to Newspaper X, and 5 answered they are subscribing to Newspaper Y.

Here, the number of respondents subscribing to both newspapers is at most 5 and at least 2.

Sample Input 3

100 100 100

Sample Output 3

100 100



Sample input:
10 3 5


Sample output:
3 0

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())
print(min(a,b),a+b-n)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())


q=min(a, b)
w=a+b-n

print(q,w)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
if n >= a+b:
    print(min(a, b), 0)
else:
    if a == b:
        print(a, b)
    else:
        print(min(a, b), abs(a-b))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
if n > a+b:
    print(min(a, b), 0)
else:
    if a == b:
        print(a, b)
    else:
        x = max(a, b)
        y = min(a, b)
        print(y, x-y)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split());print(min(a,b),min(0,a+b-n))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split(' '))
print(f'{min(a,b)} {min(0,abs(a+b-n))}')

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split(' '))
print(f'{min(a,b)} {abs(a+b-n)}')

Submission status: Wrong Answer

Solution code:

n,a,b=map(int,input().split())
print(min(a,b))
if a+b <= n:
    print('0')
else:
    print(n -(a+b))

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
if b >= c:
  print(c, b + c - a)
else:
  print(b, b + c - a)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

if a == 0 or b == 0:
    print(0, 0)

elif a == b:
    print(a, a)

elif n > a+b:
    max_ab = min(a, b)
    print(max_ab, 0)

else:
    max_ab = min(a, b)
    print(max_ab, a+b-n)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

if a == 0 or b == 0:
    print(0, 0)

elif a == b:
    print(a, a)

elif n > a+b:
    min_ab = 0
    max_ab = min(a, b)
    print(max_ab, min_ab)

else:
    min_ab = max(a+b-n, a-b)
    max_ab = min(a, b)
    print(max_ab, min_ab)

Submission status: Wrong Answer

Solution code:
N,A,B= map(int, input().split())
X = min(A, B)
Y = max(0, A+B-10)
print(X, Y)

Submission status: Wrong Answer

Solution code:
N,A,B= map(int, input().split())
X = min(A, B)
Y = max(0, A+B-10)
print(str(X) + " " + str(Y))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
ans1 = min(a, b)
ans2 = min(0, a + b - n)
print(ans1, ans2)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
ans1 = min(a, b)
ans2 = n if ans1 == n else 0
print(ans1, ans2)

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split())

if(A>B):
  ans1=B
  ans2=A-(N-B)
else:
  ans1=A
  ans2=B-(N-A)
  
print(str(ans1)+" "+str(ans2))

Submission status: Wrong Answer

Solution code:
N,A,B = map(int,input().split())
print(min(A,B),max(0,N-A-B))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

s=min(a,b)
t=max(a,b)

if n//2>=t:
    u=0

else:
    u=t-s

print(str(s)+' '+str(u))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split());print(min(a,b),0 if a<b else n if a==b==n else a-b)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split());print(min(a,b),a if a==b else "0" if a-b<0 else a-b)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int, input().split())
print(min(a,b),min(0,a+b-n))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int, input().split())
print(min(a,b),a+b-n)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
if  n < a+b:
    print(min(a,b),n-a+b)
else:
    print(min(a,b),0)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
if  n == a+b:
    print(min(a,b),1)
else:
    print(min(a,b),0)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
print(min(a,b),min(0,a+b-n))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
high=min(a,b)
low=0
if(n<a+b):
	low=abs(a-b)
print(high,low)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
high=min(a,b)
low=0
if(n>a+b):
	low=abs(a-b)
print(high,low)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
high=min(a,b)
low=max(n-a-b,0)
print(high,low)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
print(min(a,b),max(abs(n - (a+b)),0))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
print(min(a,b),max(n - (a+b),0))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

N,A,B = IL()

print(min(A,B),A+B-N)

Submission status: Wrong Answer

Solution code:
x, y, z = map(int,input().split())
print(min(y,z), max(0, x-y-z))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
print(max(a+b-n,0),min(a,b))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
print(min(a,b))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())
Max = min(a,b)
if n==a or n==b: Min=min(a,b)
elif a+b > n: Min = abs(a-b)
else: Min = 0
print(Max, Min)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())
Max = min(a,b)
if a==b: Min=a
elif a+b >= n: Min = abs(a-b)
else: Min = 0
print(Max, Min)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())
Max = min(a,b)
if n==a==b: Min=a
elif a+b >= n: Min = abs(a-b)
else: Min = 0
print(Max, Min)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
if a+b>=n:
    print(a+b-n)
else:
    print(max(a,b))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())
l = [a,b]

if a == b:
  print(a, b)
else:
  print(min(l),max(l)-min(l))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import re
import math
import itertools
from copy import deepcopy
import fractions
import random
from heapq import heappop,heappush
import time
import os
import sys
import datetime
from functools import lru_cache
readline=sys.stdin.readline
sys.setrecursionlimit(2000)
#import numpy as np
alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def fac_list(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
#######################################################################################################
N,A,B=map(int,input().split())
r=0
if A+B<N:
    r=0
else:
    r=N-A-B
print(min(A,B),r)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import re
import math
import itertools
from copy import deepcopy
import fractions
import random
from heapq import heappop,heappush
import time
import os
import sys
import datetime
from functools import lru_cache
readline=sys.stdin.readline
sys.setrecursionlimit(2000)
#import numpy as np
alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def fac_list(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
#######################################################################################################
N,A,B=map(int,input().split())
r=0
if A+B<N:
    r=0
else:
    r=N-A-B
print(r,min(A,B))

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split())
print(A+B-N)

Submission status: Wrong Answer

Solution code:
N, A, B = map(int,input().split())

print(str(min(A, B)) + " " + str(max(N, A+B)-min(N,A+B)))

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())

ans1 = B if A>B else A
ans2 = A+B-N

print("{} {}".format(ans1, ans2))

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())

ans1 = B if A>B else A
ans2 = A+B-N

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())
if b<a :
  ans1 = b
  ans2 = abs(b-a)
else:
  ans1 = b
  ans2 = 0
print('{0} {1}'.format(ans1, ans2))

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
M = min(A, B)
if A + B <= N:
  m = 0
else:
  m = N - A - B
print(M, m)

Submission status: Wrong Answer

Solution code:
N, A, B = map(int,input().split())
print(str(min(A, B)) + " " + str(abs(N - (2 * N - A - B))))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

m=0
s=0
if a>b:
  m=a
else:
  m=b

if a+b>n:
  s=a+b-n
  
  
print(m,s)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

if(n >= a+b):
    print(max(a, b), end=' ')
    print(0)
else:
    print(max(a, b), end=' ')
    print(a+b-n)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

if(n >= a+b):
    print(a if b >= a else b, end=' ')
    print(0)
elif(n == a == b):
    print(n, end=' ')
    print(n)
elif(n == a or n == b):
    print(a if n!=a else b, end=' ')
    print(a if n!=a else b, end=' ')
else:
    print(a if b >= a else b, end=' ')
    print(abs(a-b))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

if(n >= a+b):
    print(a if b >= a else b, end=' ')
    print(0)
elif(n == a == b):
    print(n, end=' ')
    print(n)
elif(n == a or n == b):
    print(a if n!=a else b)
else:
    print(a if b >= a else b, end=' ')
    print(abs(a-b))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

if(n >= a+b):
    print(a if b >= a else b, end=' ')
    print(0)
elif(n == a == b):
    print(n, end=' ')
    print(n)
else:
    print(a if b >= a else b, end=' ')
    print(abs(a-b))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

if(n >= a+b):
    print(a if b >= a else b, end=' ')
    print(0)
else:
    print(a if b >= a else b, end=' ')
    print(abs(a-b))

Submission status: Wrong Answer

Solution code:
N,A,B = map(int,input().split())
print(max(A,B),min(A,B))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

if n < a+b:
	mi=a+b-n
else:
	mi=0

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

ans1=min(a,b)
ans2=a+b-n
print(ans1,ans2)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split());print(min(n,a+b),max(0,a+b-n))

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
print(min(A, B), N - (A + B))

Submission status: Wrong Answer

Solution code:
from sys import stdin
import fractions

n,a,b = [int(x) for x in stdin.readline().rstrip().split()]

print(min(a,b),max(0,a+b-10))

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split())
print(max(0,min(A,B) -(N-max(A,B))),min(A,B))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

x = min(a,b)
y = max(a+b-10, 0)

print(x, y)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
if a > b:
    if n > a + b:
        print(b,0)
    elif n < a + b:
        print(b,a-b)
elif a < b:
    if n > a + b:
        print(a,0)
    elif n < a + b:
        print(a,b-a)
elif a == b == n:
    print(a,b)

Submission status: Wrong Answer

Solution code:
N, A, B = list(map(int,input().split()))

up = min(A,B)

if A+B >= N:
  down = N-(A+B)
else:
  down = 0
  
print(up,down)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
print(max(a+b-n,0),min(a,b))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
x=0
if a<b:
    x=0
elif a==b:
    x=a
else:
    x=a-b
print(min(a,b),x)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

ans=[0,0]

ans[0]=max(a,b)
ans[1]=max(0,a+b-n)
print(*ans)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

and_=min(a,b)
or_=a+b-n
print(and_, or_)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

and_=abs(a-b)
or_=a+b-n
print(and_, or_)

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split()))
if n[1] != n[2]:
  print(min(n[1], n[2]), max(0, n[1] - n[2]))
else:
  print(min(n[1], n[2]), max(n[1], n[1] - n[2]))

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split()))
print(min(n[1], n[2]), max(0, n[1] - n[2]))

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split()))
print(min(n[1], n[2]))
print(max(0, n[1] - n[2]))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
print(min(a,b),a+b-100 if a+b>=100 else 0)

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
print(max(A,B), max(A+B-N,0))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int,input().split())
print(max(a, b), end='')
print(max(a+b-n,0))

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split())
print(A+B-N,min(A,B))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
print(min(a,b),min(a,b)-max(0,(n-max(a,b))))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
print(min(a,b),min(a,b)-(n-max(a,b)))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
print(min(a,b),max(0,n-(a+b)))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
if a>b:
  a,b=b,a
print(b,n-a)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
print(max(a,b),max(0,a+b-n))

Submission status: Wrong Answer

Solution code:
# PROXY

list = [int(i) for i in input().split()]
print(min(list),abs(list[1]-list[2]))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
ans1 = min(a,b)
if n<=a+b:
    ans2=abs(a-b)
else:
    ans2=0
print(ans1,ans2)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
ans1 = min(a,b)
if n<a+b:
    ans2=abs(a-b)
else:
    ans2=0
print(ans1,ans2)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())

max=max(a,b)

if n>a+b:
  min=0
  
else:
  min=min(a,b)
  
  
print(int(max),int(min))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
print(min(a,b),max(0,b+c-a))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
print(min(c,a+b),min(a,b))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())

max_ = min(a, b)

if max(n, a+b) == a+b:
    min_ = a + b - n
else:
    min_ = n - (a + b)

print(max_, min_)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
if n-a-b>=0:
  print(min(a,b),n-a-b)
else:
  print(min(a,b),0)

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
if n-a-b>=0:
  print(max(a,b),n-a-b)
else:
  print(max(a,b),0)

Submission status: Wrong Answer

Solution code:
n,x,y=map(int,input().split())
if (x+y)>n:
  mn=(x+y)-n
else:
  mn=0
mx=max(x,y)
print('{} {}'.format(mx,mn))

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
if A <= B:
    print(str(A) + ' ' + str(abs(N - A - B)))
else:
    print(str(B) + ' ' + str(abs(N - A - B)))

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
print(min(a,b),a+b-n)

Submission status: Wrong Answer

Solution code:
N, A, B = list(map(int, input().split()))

ans1 = min(A, B)
ans2 = max(N - A - B, 0)

print(ans1, ans2)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
print(min(a, b), a+b-n)

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
ResMax = max(A, B)
ResMin = max(0, A+B-N)
print(ResMax, ResMin)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split());print(max(b,c),max(0,b+c-a))

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split(' '))
print(str(A+B-N)+' '+str(min(A,B)))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
data = input()
data.split(" ")
print(data)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
print(max(a,b), max(a+b-n, 0))

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
print(B if A > B else A, end=" ")
z = A + B - 10
print(z if z > 0 else 0)

Submission status: Wrong Answer

Solution code:
N, X, Y = map(int, input().split())

res1 = min(X, Y)

if X + Y <= N:
  res2 = 0
  
else:
  res2 = N - X - Y
  
print(res1, res2)

Submission status: Wrong Answer

Solution code:
Moji=str(input())
ListNAB=Moji.split() #N,A,Bの順にリストに格納
N=int(ListNAB[0])
A=int(ListNAB[1])
B=int(ListNAB[2])
c=0
if A>=B:
  nmax=B
  c=1
elif A<B:
  nmax=A
  c=2

if N>A+B:
  nmin=0

if N<=(A+B):
  if c==1:
    nmin=B
  if c==2:
    nmin=A

print(str(nmax)+" "+str(nmin))

Submission status: Wrong Answer

Solution code:
n,a,b = list(map(int,input().split()))

if(a+b <= n):
    print(str(min(a,b)) + " 0")
else:
    print(str(min(a,b)) + " " + str(abs(a-b)))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18

N, A, B = map(int, raw_input().split())

print max(A, B), max(0, A + B - N)

Submission status: Wrong Answer

Solution code:
N, A, B = map(int,input().split())
li = [A, B]
if sum(li)<=10:
  a = 0
else:
  a = sum(li)-N
print(min(li),a)

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
print('{} {}'.format(max(a, b), max(0, a+b-n)))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
print('{} {}'.format(max(a, b), max(0, n-a-b)))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, raw_input().split())
print(min(a, b), max(0, a + b - n))

Submission status: Wrong Answer

Solution code:
import sys

n,a,b=map(int,sys.stdin.readline().split())

max = min(a,b) if (n>=a+b) else n
print(max, end=" ")
min = 0 if (n>=a+b) else abs(a-b)
print(min)

Submission status: Wrong Answer

Solution code:
n , a, b = map(int, input().split())
n = int(n)
a = int(a)
b = int(b)


if (a > b ) :
	mx_a = b
else:
	mx_a = a

mx_y = a+b - n

print(str(mx_a) + ' ' + str(mx_y))

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
a = int(a)
b = int(b)
c = int(c)


if (a > b ) :
	mx_a = b
else:
	mx_a = a

mx_y = a+b - c

print(str(mx_a) + ' ' + str(mx_y))

Submission status: Wrong Answer

Solution code:

a, b, c = map(int, input().split())

if (a > b ) :
	mx_a = b
else:
	mx_a = a

mx_y = a+b - c

print(str(mx_a) + ' ' + str(mx_y))

Submission status: Wrong Answer

Solution code:
def Min(n,a,b):
    if(n >= a + b):
        return 0
    else:
        return abs(a - b)
if __name__ == '__main__':
     list_of_input = list(map(int,input().split()))
     n = list_of_input[0]
     a = list_of_input[1]
     b = list_of_input[2]
     
     if(a == n & b == n):
        print(list_of_input[1],list_of_input[2])
     elif(a == 0 | b == 0):
         print(0,0)
     else:
         min_subscriber = Min(n,a,b)
         max_subscriber = min(a,b)
         print(max_subscriber,min_subscriber)

Submission status: Wrong Answer

Solution code:
def Min(n,a,b):
    if(n > a + b):
        return 0
    else:
        return abs(a - b)
if __name__ == '__main__':
     list_of_input = list(map(int,input().split()))
     n = list_of_input[0]
     a = list_of_input[1]
     b = list_of_input[2]
     if(list_of_input[1] != list_of_input[2]):
         min_subscriber = Min(n,a,b)
         max_subscriber = min(a,b)
         print(max_subscriber,min_subscriber)
     elif(a == b):
        print(list_of_input[1],list_of_input[2])
     elif(a == 0 | b == 0):
         print(0,0)

Submission status: Wrong Answer

Solution code:
def Min(n,a,b):
    if(n > a + b):
        return 0
    else:
        return abs(a - b)
if __name__ == "__main__":
     list_of_input = list(map(int,input().split()))
     if(list_of_input[1] != list_of_input[2]):
         min_subscriber = Min(list_of_input[0],list_of_input[1],list_of_input[2])
         max_subscriber = min(list_of_input[1],list_of_input[2])
         print(max_subscriber,min_subscriber)
     else:
        print(list_of_input[1],list_of_input[2])

Submission status: Wrong Answer

Solution code:
N, A, B = map(int,input().split())
mini = A + B - N
maxi = min(A,B)
print(maxi,mini)

Submission status: Wrong Answer

Solution code:
n,x,y = map(int,input().split())
print(min(x,y),x+y-n)

Submission status: Wrong Answer

Solution code:
n1, n2, n3 = list(map(int, input().split()))
x = min(n2,n3)
if n2+n3<=10:
    y=0
else:
    y = n2+n3-n1
print(x,y)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())

min_num = min(a,b)
max_num = max(abs(n-a-b),0)

print(min_num, max_num)

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())

min_num = min(a,b)
max_num = max(abs(n-a-b),0)

print(max_num, min_num)

Submission status: Wrong Answer

Solution code:
N, A, B = [int(i) for i in input().split()]
 
X = A if A < B else B
Y = 0 if N > (A+B) else N - (A+B)
 
print("{0} {1}".format(X, Y))

Submission status: Wrong Answer

Solution code:
N, A, B = [int(i) for i in input().split()]

X = A if A > B else B
Y = 0 if N > (A+B) else N - (A+B)

print("{0} {1}".format(X, Y))

Submission status: Wrong Answer

Solution code:
n,a,b = map(int, input().split())
if a+b > 10:
  q = a+b-10
else :
  q = 0
print( str(min(a,b)) +" "+ str(q))

Submission status: Wrong Answer

Solution code:
import sys

def r(n, a, b):
    both_max = min(a, b)
    if 0 < a + b - n:
        both_min = a + b - n
    else:
        both_min = 0

    print(both_max, both_min)


def main():
    input = sys.stdin.readline
    n, a, b = list(map(int, input().split()))
    print(r(n, a, b))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
num = list(map(int, input().split()))
a = min(num[1],num[2])
b = max(0, num[0] - (num[1]+num[2]))
print(a,b)

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
print(min(A, B), max(0, N - (A + B)))

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, raw_input().split())
m=A+B
print(min(A, B), max(0,m-N))

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,raw_input().split())
m=A+B

if A==B==N:
	print N,N
elif(m>N):
	if A==B:
		print A,2*A-N
	else:
		print min(A,B),abs(A-B)
else:
	print min(A,B),0

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,raw_input().split())
m=A+B
if A==0 or B==0:
	print 0,0
elif A==B==N:
	print N,N
elif(m>N):
	if A==B:
		print A,2*A-1
	else:
		print min(A,B),abs(A-B)
else:
	print min(A,B),0

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,raw_input().split())
m=A+B
if A==0 or B==0:
	print 0,0
elif A==B==N:
	print N,N
elif(m>N):
	if A==B:
		print A,2*A-N
	else:
		print min(A,B),abs(A-B)
else:
	print min(A,B),0

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,raw_input().split())
m=A+B
if A==B==N:
	print N,N
elif(m>N):
	if A==B:
		print A,2*A-N
	else:
		print min(A,B),abs(A-B)
else:
	print min(A,B),0