• + 0 comments

    haskell

    main = do
      getLine
      la <- getLine
      getLine
      lb <- getLine
      let xs = map read (words la) :: [Integer]
          ys = map read (words lb) :: [Integer]
      print $ gcd (product xs) (product ys) `mod` 1000000007