eolymp
bolt
Try our new interface for solving problems
Problems

Brave Balloonists

Brave Balloonists

Ten mathematicians are flying on a balloon over the Pacific ocean. When they are crossing the equator they decide to celebrate this event and open a bottle of champagne. Unfortunately, the cork makes a hole in the balloon. Hydrogen is leaking out and the balloon is descending now. Soon it will fall into the ocean and all the balloonists will be eaten by hungry sharks. But not everything is lost yet. One of the balloonists can sacrifice himself jumping out, so that his friends would live a little longer. Only one problem still exists: who is the one to get out. There is a fair way to solve this problem. First, each of them writes an integer ai not less than \textbf{1} and not more than \textbf{10000}. Then they calculate the magic number \textbf{N} that is the number of positive divisors of the product \textbf{a_1·a_2·…·a_10}. For example, the number of positive integer divisors of \textbf{6} is \textbf{4} (they are \textbf{1}, \textbf{2}, \textbf{3}, \textbf{6}). The hero (a mathematician who will be thrown out) is determined according to the last digit of \textbf{N}. Your task is to find this digit. \InputFile Input contains ten integer numbers (each number is in separate line). \OutputFile Output a single digit from \textbf{0} to \textbf{9} --- the last digit of \textbf{N}.
Time limit 2 seconds
Memory limit 16 MiB
Input example #1
1
2
6
1
3
1
1
1
1
1

Output example #1
9
Author Stanislav Vasilyev
Source Ural State University collegiate programming contest (25.03.2000)