Microsoft to buy Great Plains for $1.1 billion