lib C fun getchar_unlocked : Int32 end def read_int : Int64 ans = 0 f = 1 c = C.getchar_unlocked() while [9, 10, 11, 12, 13, 32].includes?(c) c = C.getchar_unlocked() end if c == 45 f = -1 c = C.getchar_unlocked() end while (48 .. 57).includes?(c) ans = (ans << 1) + (ans << 3) + (c ^ 48) c = C.getchar_unlocked() end return (ans * f).to_i64 end puts(read_int * read_int % 1000000007_i64)