n,m=gets.split.map &:to_i;p (1..n).sum{|a|(1..m).sum{a.lcm _1}}%998244353