Under construction

Still being built. Things may change

Mischievous Math

Time limit1sMemory limit1024 MB

Summary
Given d, output distinct a, b, c from 1 to 100, all different from d, so that no expression using each at most once with +, -, *, / and parentheses equals d.
Level

Medium5 of 10

Topics
Math, Brute force
Solved
No attempts yet

Problem

Max enjoys number games, whether they involve finding a combination that leads to a given result or listing all possible results for some given integers. Max is only 10 and has limited mathematical knowledge, which restricts the games he can play. In today's maths class, Max learned about parentheses and how they change a calculation. After getting home from school, he asked his sister Nina to play a variant of his favourite number game with parentheses.

In this game, Max first tells her a number dd. Nina then tells him three numbers aa, bb and cc. Max must find an arithmetic expression that uses addition, subtraction, multiplication and division, and parentheses, so that the result equals dd. Each of aa, bb and cc is used at most once. The numbers aa, bb, cc and dd must all be distinct.

For example, for a=5a = 5, b=8b = 8, c=17c = 17 and d=96d = 96, one solution is (17−5)×8=96(17 - 5) \times 8 = 96. For a=3a = 3, b=7b = 7, c=84c = 84 and d=12d = 12, one solution is 84÷7=1284 \div 7 = 12, which does not use the 33.

Nina wants to keep Max busy for as long as possible, so she asks you to find three numbers aa, bb and cc for which Max cannot find any solution.

Input

The input consists of one line with an integer dd (1≤d≤1001 \le d \le 100), Max's chosen number.

Output

Output three numbers aa, bb and cc (1≤a,b,c≤1001 \le a,b,c \le 100) such that aa, bb, cc and dd are pairwise distinct and the number game has no solution for them.

Examples3

  1. Example 1

    Input
    5
    
    Expected output
    1 20 30
    
  2. Example 2

    Input
    100
    
    Expected output
    33 55 77
    
  3. Example 3

    Input
    3
    
    Expected output
    11 9 4