In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the "year-month-day" order, or the "month-day" order without the year.   For example, May 3, 2018 is written as 2018-5-3, or 5-3 without the year.  In this country, a date is called _Takahashi_ when the month and the day are equal as numbers. For example, 5-5 is Takahashi.   How many days from 2018-1-1 through 2018-a-b are Takahashi?
a, b = map(int, input().split())

if a<b:
  print('a')
else:
  print('a-1')
a, b = map(int, input().split())

if a<=b:
  print(a)
else:
  print(a-1)