Two-dimensional layers of gold or silver become semiconductors