@Agha Abbas - listen to the input listed above. While it may be a good diversification strategy to invest in cash flow markets as well as an appreciating market, SF makes it hard to be a landlord. One poor tenant choice could set you back tens of thousands of dollars very quickly.
Also, finding property in the city at all is challenging - sellers routinely entertain multiple offers over their asking price, and a lot of them are cash offers. This isn't to scare you away from the SF market, but definitely know what you're getting yourself into - you need deep pockets and a good team on the ground who is very familiar with city laws to make money here.
I would recommend talking with @J. Martin about buying in the areas surrounding the city. Appreciation won't be as astronomical as in the city, but the success of SF pushes up property values in the entire bay area. If it's appreciation you're going after, you can buy in those areas without having to shell out quite as much $$$. Good luck!