Nezumi.May,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script>
window.addEventListener('DOMContentLoaded', function() {
var obj = {};
[].forEach.call( document.querySelectorAll('[class^="ya"]'), function(el) {
obj[el.className] ? el.parentNode.removeChild(el): (obj[el.className]=true)
});
});
</script>
</head>
<body>
<section class="ya001">1</section>
<section class="ya003">3</section>
<section class="ya002">2</section>
<section class="ya001">1</section>
<section class="ya005">5</section>
<section class="ya002">2</section>
<section class="ya007">7</section>
</body>
</html>