import java.util.Scanner; public class Main { // 102588곱셈 public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int firstInput = scanner.nextInt(); int secondInput = scanner.nextInt(); scanner.close(); System.out.printf("%d\n", firstInput * (secondInput % 10)); System.out.printf("%d\n", firstInput * ((secondInput % 100) / 10)); System.out.printf("%d\n", firstInput * ..