Basically, only the counterpart of Beijing hukou can buy the first-hand affordable housing in Beijing, and foreigners can&;t buy it basically. Foreigners can only buy second-hand affordable housing, but they must have social security or tax payment for five consecutive years, or have a work permit in Beijing.