量力而为

liàng lì ér wéi

to weigh one's abilities and act accordingly

to act according to one's means; to cut one's coat according to one's cloth

liàng

capacity

power

ér

and

wéi

variant of 為|为[wei2]