/*!
 * path: /contest/atcoder/abc170/d.ts
 * code:
 * import fs from 'fs';
 * import { getNext, getInt, getIntArray } from '../../common/io';
 * import { getDivisors } from '../../common/math';
 * 
 * export function main(line: string) {
 *     const next = getNext(line);
 *     const N = getInt(next);
 *     const A = getIntArray(next, N);
 *     const all = new Set(A);
 *     const count = new Map<number, number>();
 *     for (const v of A) {
 *         count.set(v, (count.get(v) || 0) + 1);
 *     }
 *     let ans = 0;
 *     L: for (const v of A) {
 *         const divs = getDivisors(v);
 *         if (count.get(v) > 1) {
 *             continue;
 *         }
 *         for (const div of divs) {
 *             if (div === v) {
 *                 continue;
 *             }
 *             if (all.has(div)) {
 *                 continue L;
 *             }
 *         }
 *         ans++;
 *     }
 *     console.log(ans);
 * }
 * 
 * if (require.main === module) {
 *     const line = fs.readFileSync("/dev/stdin", "utf8");
 *     main(line);
 * }
 * 
 * recovery:
 * require('fs').writeFileSync('code.ts.txt', Buffer.from('aW1wb3J0IGZzIGZyb20gJ2ZzJzsKaW1wb3J0IHsgZ2V0TmV4dCwgZ2V0SW50LCBnZXRJbnRBcnJheSB9IGZyb20gJy4uLy4uL2NvbW1vbi9pbyc7CmltcG9ydCB7IGdldERpdmlzb3JzIH0gZnJvbSAnLi4vLi4vY29tbW9uL21hdGgnOwoKZXhwb3J0IGZ1bmN0aW9uIG1haW4obGluZTogc3RyaW5nKSB7CiAgICBjb25zdCBuZXh0ID0gZ2V0TmV4dChsaW5lKTsKICAgIGNvbnN0IE4gPSBnZXRJbnQobmV4dCk7CiAgICBjb25zdCBBID0gZ2V0SW50QXJyYXkobmV4dCwgTik7CiAgICBjb25zdCBhbGwgPSBuZXcgU2V0KEEpOwogICAgY29uc3QgY291bnQgPSBuZXcgTWFwPG51bWJlciwgbnVtYmVyPigpOwogICAgZm9yIChjb25zdCB2IG9mIEEpIHsKICAgICAgICBjb3VudC5zZXQodiwgKGNvdW50LmdldCh2KSB8fCAwKSArIDEpOwogICAgfQogICAgbGV0IGFucyA9IDA7CiAgICBMOiBmb3IgKGNvbnN0IHYgb2YgQSkgewogICAgICAgIGNvbnN0IGRpdnMgPSBnZXREaXZpc29ycyh2KTsKICAgICAgICBpZiAoY291bnQuZ2V0KHYpID4gMSkgewogICAgICAgICAgICBjb250aW51ZTsKICAgICAgICB9CiAgICAgICAgZm9yIChjb25zdCBkaXYgb2YgZGl2cykgewogICAgICAgICAgICBpZiAoZGl2ID09PSB2KSB7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoYWxsLmhhcyhkaXYpKSB7CiAgICAgICAgICAgICAgICBjb250aW51ZSBMOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGFucysrOwogICAgfQogICAgY29uc29sZS5sb2coYW5zKTsKfQoKaWYgKHJlcXVpcmUubWFpbiA9PT0gbW9kdWxlKSB7CiAgICBjb25zdCBsaW5lID0gZnMucmVhZEZpbGVTeW5jKCIvZGV2L3N0ZGluIiwgInV0ZjgiKTsKICAgIG1haW4obGluZSk7Cn0K', 'base64').toString('utf8'), 'utf8');
 */!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.main=void 0;const o=r(n(2)),i=n(3),u=n(4);function f(t){const e=i.getNext(t),n=i.getInt(e),r=i.getIntArray(e,n),o=new Set(r),f=new Map;for(const t of r)f.set(t,(f.get(t)||0)+1);let c=0;t:for(const t of r){const e=u.getDivisors(t);if(!(f.get(t)>1)){for(const n of e)if(n!==t&&o.has(n))continue t;c++}}console.log(c)}if(e.main=f,n.c[n.s]===t){f(o.default.readFileSync("/dev/stdin","utf8"))}}).call(this,n(1)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=require("fs")},function(t,e,n){"use strict";function*r(t){const e=t.split(/\s+/);for(const t of e)yield t}Object.defineProperty(e,"__esModule",{value:!0}),e.getBigIntArray=e.getIntArray=e.getInt=e.getNextBigInt=e.getNextInt=e.getNext=e.getIteratorWithParser=e.getIterator=void 0,e.getIterator=r,e.getIteratorWithParser=function*(t,e){const n=t.split(/\s+/);for(const t of n)yield e(t)},e.getNext=function(t){const e=r(t);return()=>e.next().value},e.getNextInt=function(t){const e=r(t);return()=>parseInt(e.next().value)},e.getNextBigInt=function(t){const e=r(t);return()=>BigInt(e.next().value)},e.getInt=function(t){return parseInt(t())},e.getIntArray=function(t,e){const n=[];for(let r=0;r<e;r++)n[r]=parseInt(t());return n},e.getBigIntArray=function(t,e){const n=[];for(let r=0;r<e;r++)n[r]=BigInt(parseInt(t()));return n}},function(t,e,n){"use strict";function r(t){return 16843009*((t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135)>>24}Object.defineProperty(e,"__esModule",{value:!0}),e.getDivisorsTable=e.getDivisors=e.bitCount32=e.bitCount=void 0,e.bitCount=function(t){for(var e=0;0!==t;)e+=r(0|t),t/=4294967296;return e},e.bitCount32=r,e.getDivisors=function(t){const e=[];for(let n=1;n*n<=t;n++)t%n==0&&(e.push(n),n*n!=t&&e.push(t/n));return e},e.getDivisorsTable=function(t){const e=new Array(t+1).fill(1),n=new Array(t+1).fill(!0);e[1]=1;for(let r=2;r<=t;r++)if(n[r]){e[r]=2;for(let o=r+r;o<=t;o+=r){n[o]=!1;let t=o,i=0;for(;t%r==0;)t/=r,i++;e[o]*=i+1}}return e}}]);
//# sourceMappingURL=submit.js.map