#PCBSAU0000017. Tách các chữ số (Extract Four Digits)

Tách các chữ số (Extract Four Digits)

Extract Four Digits

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given a positive four-digit integer nn, extract its thousands, hundreds, tens and units digits and calculate their sum.

Input

One line containing integer nn.

Output

Print the four digits from left to right, separated by spaces; on the second line print their sum.

Subtask

  • Subtask 1 — 100 points: 1000≤n≤99991000\le n\le9999.

Example

Input

4729

Output

4 7 2 9
22

Explanation

The digits are 44, 77, 22, 99 using integer division and modulo. Their sum is 2222.